From 3aeb9beca2812faee7f76d6cbabf3e1b21e7f25d Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:57:13 -0500 Subject: [PATCH] Use reusable workflow in sync_sites_branch (#349) Update the `sync_sites_branch` workflow to use the new reusable workflow. J=SLAP-2507 TEST=manual Test on a forked repo and see that a commit to `main` triggers a merge commit to the `storybook-site` and `test-site` branches. --- .github/workflows/sync-sites-branch.yml | 27 +++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/sync-sites-branch.yml b/.github/workflows/sync-sites-branch.yml index dbee82df6..5ceccf24f 100644 --- a/.github/workflows/sync-sites-branch.yml +++ b/.github/workflows/sync-sites-branch.yml @@ -6,21 +6,12 @@ on: - main jobs: - sync-branches: - runs-on: ubuntu-latest - name: Syncing branches - steps: - - name: Checkout - uses: actions/checkout@v3 - - uses: devmasx/merge-branch@v1.4.0 - with: - type: now - from_branch: ${{ github.event.repository.default_branch }} - target_branch: storybook-site - github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: devmasx/merge-branch@v1.4.0 - with: - type: now - from_branch: ${{ github.event.repository.default_branch }} - target_branch: test-site - github_token: ${{ secrets.GITHUB_TOKEN }} + call_sync_branches: + strategy: + matrix: + target_branch: ["storybook-site", "test-site"] + uses: yext/slapshot-reusable-workflows/.github/workflows/sync_default_branch.yml@v1 + with: + target_branch: ${{ matrix.target_branch }} + secrets: + caller_github_token: ${{ secrets.GITHUB_TOKEN }}