diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..4edc60e9 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,24 @@ +name: Automatic backport action + +on: + pull_request_target: + types: ["labeled", "closed"] + +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 + uses: sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 # v9.5.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Info log + if: ${{ success() }} + run: cat ~/.backport/backport.info.log + + - name: Debug log + if: ${{ failure() }} + run: cat ~/.backport/backport.debug.log