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