-
Notifications
You must be signed in to change notification settings - Fork 5.5k
50 lines (45 loc) · 1.54 KB
/
backport.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Backport PR
run-name: "Backport PR #${{ github.event.number }}"
on:
pull_request_target:
types:
- "labeled"
- "closed"
permissions:
contents: write
pull-requests: write
jobs:
backport:
name: Backport PR
runs-on:
- ubuntu-latest
if: |
github.event.pull_request.merged == true
&& (
contains(github.event.pull_request.labels.*.name, 'backport:master') ||
contains(github.event.pull_request.labels.*.name, 'backport:3007.x') ||
contains(github.event.pull_request.labels.*.name, 'backport:3006.x') ||
contains(github.event.pull_request.labels.*.name, 'backport:3005.x')
)
&& (
(github.event.action == 'labeled' && (
contains(github.event.pull_request.labels.*.name, 'backport:master') ||
contains(github.event.pull_request.labels.*.name, 'backport:3007.x') ||
contains(github.event.pull_request.labels.*.name, 'backport:3006.x') ||
contains(github.event.pull_request.labels.*.name, 'backport:3005.x')
))
|| (github.event.action == 'closed')
)
steps:
- name: Backport Action
uses: sorenlouv/backport-github-action@v8.9.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: "backport:"
add_original_reviewers: true
- name: Info log
if: ${{ success() }}
run: jq -C '.' ~/.backport/backport.info.log
- name: Debug log
if: ${{ failure() }}
run: jq -C '.' ~/.backport/backport.debug.log