diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 6a7477e..309bb53 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -2,11 +2,16 @@ name: Automatic backport action on: pull_request_target: - types: ["closed"] + types: ["closed", "labeled"] + +permissions: + contents: write # so it can comment + pull-requests: write # so it can create pull requests jobs: backport: name: Backport PR + if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport')) runs-on: ubuntu-latest steps: - name: Backport Action @@ -21,4 +26,4 @@ jobs: - name: Debug log if: ${{ failure() }} - run: cat ~/.backport/backport.debug.log \ No newline at end of file + run: cat ~/.backport/backport.debug.log