Skip to content

Commit 1f7698e

Browse files
ci: add backport workflow (#125)
1 parent ec9290f commit 1f7698e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/backport.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
pull_request_target:
3+
types: [ "labeled", "closed" ]
4+
5+
jobs:
6+
backport:
7+
name: Backport PR
8+
runs-on: ubuntu-latest
9+
if: |
10+
github.event.pull_request.merged == true
11+
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
12+
&& (
13+
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
14+
|| (github.event.action == 'closed')
15+
)
16+
steps:
17+
- name: Backport Action
18+
uses: sqren/[email protected]
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
auto_backport_label_prefix: auto-backport-to-
22+
add_original_reviewers: true
23+
24+
- name: Info log
25+
if: ${{ success() }}
26+
run: cat ~/.backport/backport.info.log
27+
28+
- name: Debug log
29+
if: ${{ failure() }}
30+
run: cat ~/.backport/backport.debug.log

0 commit comments

Comments
 (0)