Backport bot (#1800)

This commit is contained in:
Salah Benmoussati
2023-03-20 14:09:04 +01:00
committed by GitHub
parent d039a4a554
commit 62cc392a41

View File

@@ -1,26 +1,17 @@
name: Backport
name: Backport merged pull request
on:
pull_request_target:
types:
- closed
- labeled
types: [closed]
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
jobs:
backport:
name: Backport
name: Backport pull request
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
# Don't run on closed unmerged pull requests
if: github.event.pull_request.merged
steps:
- uses: tibdex/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Create backport pull requests
uses: korthout/backport-action@v1