From c83fdc5c87646f1fc20d0d8103f4209f8b155e24 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Mon, 7 Aug 2023 09:59:38 +0800 Subject: [PATCH] update backport branch name (#885) Signed-off-by: Hailong Cui --- .github/workflows/backport.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 5f7cb712b..06681a263 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -9,6 +9,15 @@ on: jobs: backport: runs-on: ubuntu-latest + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) permissions: contents: write pull-requests: write @@ -26,6 +35,6 @@ jobs: uses: VachaShah/backport@v2.2.0 with: github_token: ${{ steps.github_app_token.outputs.token }} - branch_name: backport/backport-${{ github.event.number }} + head_template: backport/backport-<%= number %>-to-<%= base %> labels_template: "<%= JSON.stringify([...labels, 'autocut']) %>" - failure_labels: "failed backport" \ No newline at end of file + failure_labels: "failed backport"