File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
1
2
name : Backport
2
3
on :
3
- pull_request :
4
+ pull_request_target :
4
5
types :
5
6
- closed
6
7
- labeled
7
8
8
9
jobs :
9
10
backport :
10
- runs-on : ubuntu-latest
11
11
name : Backport
12
+ runs-on : ubuntu-latest
13
+ # Only react to merged PRs for security reasons.
14
+ # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
15
+ if : >
16
+ github.event.pull_request.merged
17
+ && (
18
+ github.event.action == 'closed'
19
+ || (
20
+ github.event.action == 'labeled'
21
+ && contains(github.event.label.name, 'backport')
22
+ )
23
+ )
12
24
steps :
13
- - name : Backport
14
- uses : tibdex/backport@7005ef85c4562bc23b0e9b4a9940d5922f439750
25
+ - uses : tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
15
26
with :
16
27
github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments