Skip to content

Commit fc3be13

Browse files
committed
ci: add backport workflow
1 parent a413a06 commit fc3be13

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/backport.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Backport merged pull request
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
- labeled
8+
9+
permissions:
10+
contents: write # so it can comment
11+
pull-requests: write # so it can create pull requests
12+
13+
jobs:
14+
backport:
15+
name: Backport pull request
16+
runs-on: ubuntu-latest
17+
if: >
18+
(
19+
github.event.action == 'closed' &&
20+
github.event.pull_request.merged &&
21+
(
22+
startsWith(github.event.pull_request.title, 'fix:') ||
23+
startsWith(github.event.pull_request.title, 'chore:')
24+
)
25+
) ||
26+
(
27+
github.event.action == 'labeled'
28+
&& startsWith(github.event.label.name, 'backport')
29+
&& github.event.pull_request.merged
30+
)
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Create backport pull requests
34+
uses: korthout/backport-action@v3

0 commit comments

Comments
 (0)