diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 17227789..7bb427f5 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,12 +1,12 @@ name: Automatic Backport on: - pull_request_target: - types: ["labeled", "closed"] + pull_request: + types: ["closed", "labeled"] jobs: backport: - if: startsWith(github.event.pull_request.labels.*.name, 'backport-to-') + if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'backport-to-main') == true) }} name: Backport PR runs-on: ubuntu-latest steps: