From e386e8fdaf9b6529471d6386f6e9b954bda9f568 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 31 Jul 2024 12:27:58 +0200 Subject: [PATCH] Add backport action Signed-off-by: Matteo Collina --- .github/workflows/backport.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000000..4621cf7e510 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,29 @@ +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +permissions: + pull-requests: write + contents: write + +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') + ) + ) + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }}