From 91c1bebcd37ccbbb4d82f5b85c9d9af98ed883b1 Mon Sep 17 00:00:00 2001 From: lidongyang Date: Tue, 15 Sep 2026 17:23:50 +0800 Subject: [PATCH] ci: auto cherry-pick labeled master PRs to branch-4.2 --- .github/workflows/auto-cherry-pick.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-cherry-pick.yml b/.github/workflows/auto-cherry-pick.yml index 932409e6d4046f..081134cfb93fb2 100644 --- a/.github/workflows/auto-cherry-pick.yml +++ b/.github/workflows/auto-cherry-pick.yml @@ -31,7 +31,7 @@ permissions: jobs: auto_cherry_pick: runs-on: ubuntu-latest - if: ${{(contains(github.event.pull_request.labels.*.name, 'dev/4.1.x') || github.event.label.name == 'dev/4.1.x') && github.event.pull_request.merged == true }} + if: ${{(contains(github.event.pull_request.labels.*.name, 'dev/4.1.x') || contains(github.event.pull_request.labels.*.name, 'dev/4.2.x') || github.event.label.name == 'dev/4.1.x' || github.event.label.name == 'dev/4.2.x') && github.event.pull_request.merged == true }} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -64,3 +64,11 @@ jobs: run: | python tools/auto-pick-script.py ${{ github.event.pull_request.number }} branch-4.1 + - name: Auto cherry-pick to branch-4.2 + if: ${{ ((github.event.action == 'labeled' && github.event.label.name == 'dev/4.2.x'))|| ((github.event_name == 'pull_request_target' && github.event.action == 'closed') && contains(github.event.pull_request.labels.*.name, 'dev/4.2.x')) }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_NAME: ${{ github.repository }} + CONFLICT_LABEL: cherry-pick-conflict + run: | + python tools/auto-pick-script.py ${{ github.event.pull_request.number }} branch-4.2