From 2097012eb9f4923520e4b22d56bb1f47387d41e1 Mon Sep 17 00:00:00 2001 From: Calvin Kirs Date: Fri, 1 Nov 2024 21:26:48 +0800 Subject: [PATCH] [chore](auto-pick)Support cherry pick to 2.1 --- .github/workflows/auto-cherry-pick.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-cherry-pick.yml b/.github/workflows/auto-cherry-pick.yml index 7d97e498ba3263..7105bbccb2d8a1 100644 --- a/.github/workflows/auto-cherry-pick.yml +++ b/.github/workflows/auto-cherry-pick.yml @@ -30,7 +30,7 @@ permissions: jobs: auto_cherry_pick: runs-on: ubuntu-latest - if: ${{ contains(github.event.pull_request.labels.*.name, 'dev/3.0.x') && github.event.pull_request.merged == true }} + if: ${{ (contains(github.event.pull_request.labels.*.name, 'dev/3.0.x') || contains(github.event.pull_request.labels.*.name, 'dev/2.1.x')) && github.event.pull_request.merged == true }} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -53,10 +53,19 @@ jobs: else echo "SHA matches: $calculated_sha" fi - - name: Auto cherry-pick + - name: Auto cherry-pick to branch-3.0 + if: ${{ contains(github.event.pull_request.labels.*.name, 'dev/3.0.x') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO_NAME: ${{ github.repository }} CONFLICT_LABEL: cherry-pick-conflict-in-3.0 run: | python tools/auto-pick-script.py ${{ github.event.pull_request.number }} branch-3.0 + - name: Auto cherry-pick to branch-2.1 + if: ${{ contains(github.event.pull_request.labels.*.name, 'dev/2.1.x') }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_NAME: ${{ github.repository }} + CONFLICT_LABEL: cherry-pick-conflict-in-2.1.x + run: | + python tools/auto-pick-script.py ${{ github.event.pull_request.number }} branch-2.1