From 653ae4e6d5609988138caadd094b0680489674ca Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 4 Aug 2022 00:18:49 +0200 Subject: [PATCH] Add repo sync GitHub Action --- .github/workflows/slackhq_upstream_sync.yml | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/slackhq_upstream_sync.yml diff --git a/.github/workflows/slackhq_upstream_sync.yml b/.github/workflows/slackhq_upstream_sync.yml new file mode 100644 index 00000000000..eb7d634d701 --- /dev/null +++ b/.github/workflows/slackhq_upstream_sync.yml @@ -0,0 +1,35 @@ +name: 'SlackHQ Upstream Sync' +on: + schedule: + - cron: '0 8 * * *' + workflow_dispatch: +jobs: + sync: + name: Sync from upstream + runs-on: ubuntu-latest + strategy: + matrix: + branch: + - main + - release-12.0 + - release-13.0 + - release-14.0 + steps: + - name: Checkout target + uses: actions/checkout@v2 + with: + token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} + + - name: Sync from upstream + id: sync + uses: aormsby/Fork-Sync-With-Upstream-action@v3.2 + with: + target_sync_branch: ${{ matrix.branch }} + target_repo_token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} + upstream_sync_branch: ${{ matrix.branch }} + upstream_sync_repo: vitessio/vitess + upstream_repo_access_token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} + + - name: New commits found + if: steps.sync.outputs.has_new_commits == 'true' + run: echo "New commits were found to sync."