summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorVinicius Aquino <vinicius.aquino@ossystems.com.br>2021-07-06 17:07:16 -0300
committerVinicius Aquino <vinicius.aquino@ossystems.com.br>2021-07-07 08:46:38 -0300
commit3420ca3933d0b573fb8310fbba0a16c146486b99 (patch)
treed7a539ab46b63d457de759bcb99fc2890cdd8b38 /.github
parentfb2a125c9372aaff722b4211533a549f0e54d090 (diff)
downloadmeta-freescale-3420ca3933d0b573fb8310fbba0a16c146486b99.tar.gz
cicd: Use pull_request_target instead of pull_request
When a PR comes from a forked repo, use pull_request_target as event type instead of pull_request. Signed-off-by: Vinicius Aquino <vinicius.aquino@ossystems.com.br>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/backport.yaml8
1 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml
index 43245301..54dce5bc 100644
--- a/.github/workflows/backport.yaml
+++ b/.github/workflows/backport.yaml
@@ -1,6 +1,6 @@
1name: Backport labeled merged pull requests 1name: Backport labeled merged pull requests
2on: 2on:
3 pull_request: 3 pull_request_target:
4 types: [closed] 4 types: [closed]
5 issue_comment: 5 issue_comment:
6 types: [created] 6 types: [created]
@@ -12,11 +12,11 @@ jobs:
12 # or when a comment containing `/backport` is created 12 # or when a comment containing `/backport` is created
13 if: > 13 if: >
14 ( 14 (
15 github.event_name == 'pull_request' && 15 github.event_name == 'pull_request_target' &&
16 github.event.pull_request.merged 16 github.event.pull_request_target.merged
17 ) || ( 17 ) || (
18 github.event_name == 'issue_comment' && 18 github.event_name == 'issue_comment' &&
19 github.event.issue.pull_request && 19 github.event.issue.pull_request_target &&
20 contains(github.event.comment.body, '/backport') 20 contains(github.event.comment.body, '/backport')
21 ) 21 )
22 steps: 22 steps: