diff --git a/.github/workflows/upstream-sync.yml b/.github/workflows/upstream-sync.yml new file mode 100644 index 00000000000..9b42c027b83 --- /dev/null +++ b/.github/workflows/upstream-sync.yml @@ -0,0 +1,42 @@ +name: 'Upstream Sync' +on: + schedule: + - cron: '*/5 * * * *' + workflow_dispatch: +jobs: + sync_from_upstream: + name: Sync with github.com/vitessio/vitess + runs-on: ubuntu-latest + strategy: + matrix: + branch: + - main + - release-12.0 + - release-13.0 + - release-14.0 + steps: + - name: Checkout target repo + uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + persist-credentials: false + + - name: Sync upstream changes + id: sync + uses: aormsby/Fork-Sync-With-Upstream-action@v3.2 + with: + target_sync_branch: ${{ matrix.branch }} + target_repo_token: ${{ secrets.GITHUB_TOKEN }} + upstream_sync_branch: ${{ matrix.branch }} + upstream_sync_repo: vitessio/vitess + + - name: New commits found + if: steps.sync.outputs.has_new_commits == 'true' + run: echo "New commits were found to sync." + + - name: No new commits + if: steps.sync.outputs.has_new_commits == 'false' + run: echo "There were no new commits." + + - name: Show value of 'has_new_commits' + run: echo ${{ steps.sync.outputs.has_new_commits }}