Skip to content

Commit 162fce6

Browse files
authored
Merge pull request #9172 from joshcooper/backport
Add backport workflow
2 parents 973e2a7 + eadb49c commit 162fce6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/backport.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Backport merged pull request
2+
on:
3+
pull_request_target:
4+
types: [labeled]
5+
permissions:
6+
contents: write # so it can comment
7+
pull-requests: write # so it can create pull requests
8+
jobs:
9+
backport:
10+
name: Backport merged pull request
11+
runs-on: ubuntu-latest
12+
# For security reasons, we don't want to checkout and run arbitrary code when
13+
# using the pull_request_target trigger. So restrict this to cases where the
14+
# backport label is applied to an already merged PR.
15+
if: github.event.pull_request.merged && contains(github.event.label.name, 'backport')
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Create backport pull requests
19+
uses: korthout/backport-action@v1

0 commit comments

Comments
 (0)