From 4f98ebbb757c04280eca82ebd834f7c795c8b986 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 29 Nov 2023 14:48:07 +0800 Subject: [PATCH] feat: support synchronizing from a PR using GitHub Actions --- .github/workflows/sync_pr.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/sync_pr.yml diff --git a/.github/workflows/sync_pr.yml b/.github/workflows/sync_pr.yml new file mode 100644 index 00000000..e5f02a78 --- /dev/null +++ b/.github/workflows/sync_pr.yml @@ -0,0 +1,33 @@ +name: Sync a PR + +on: + push: + branches: + - preview/** + - preview-cloud/** + - preview-operator/** + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + sync_pr: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout current repo + uses: actions/checkout@v3 + + - name: Run sync_pr script + run: | + git config user.name "Docsite Preview Bot" + git config user.email "" + ./sync_pr.sh + ./.github/git_push.sh ${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}