1
1
name : Pull Request Backporting using Git Backporting
2
-
3
2
on :
4
3
pull_request_target :
5
4
types :
6
5
- closed
7
6
- labeled
8
-
9
7
env :
10
8
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11
9
NO_SQUASH_OPTION : true
12
-
13
10
jobs :
14
11
backporting :
15
12
name : " Backporting"
16
13
concurrency :
17
- group : backporting-${{ github.head_ref }}
18
- cancel-in-progress : true
14
+ group : backporting-${{ github.head_ref }}
15
+ cancel-in-progress : true
19
16
# Only react to merged PRs for security reasons.
20
17
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
21
18
if : >
22
- github.event.pull_request.merged
23
- && (
19
+ github.event.pull_request.merged && (
20
+
24
21
github.event.action == 'closed'
25
22
&& (contains(github.event.pull_request.labels.*.name, 'backport')
26
23
|| contains(github.event.pull_request.labels.*.name, 'backport-squash'))
@@ -29,19 +26,20 @@ jobs:
29
26
&& contains(github.event.label.name, 'backport')
30
27
)
31
28
)
29
+
32
30
runs-on : ubuntu-latest
33
31
steps :
34
32
- name : Override no-squash option
35
33
if : >
36
- (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'backport-squash'))
37
- || (github.event.action == 'labeled' && contains(github.event.label.name, 'backport-squash'))
34
+ (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'backport-squash')) || (github.event.action == 'labeled' && contains(github.event.label.name, 'backport-squash'))
35
+
38
36
shell : bash
39
37
run : |
40
38
echo "NO_SQUASH_OPTION=false" >> $GITHUB_ENV
41
39
- name : Backporting
42
40
uses : kiegroup/git-backporting@v4
43
41
with :
44
- target-branch : 0.13.x
42
+ target-branch : 0.14
45
43
pull-request : ${{ github.event.pull_request.url }}
46
44
auth : ${{ secrets.RH_PERF_BOT_TOKEN }}
47
45
no-squash : ${{ env.NO_SQUASH_OPTION }}
0 commit comments