summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorVinicius Aquino <vinicius.aquino@ossystems.com.br>2021-08-09 10:15:38 -0300
committerVinicius Aquino <vinicius.aquino@ossystems.com.br>2021-08-09 10:15:38 -0300
commit60a283e1ca675296aa3675db41a5c866fa53d0f0 (patch)
tree01511df000de6bcf95ed7f28b1dda0a322bbe9f6 /.github
parent80669e3e60c2c11be29c50d5b463a65865088750 (diff)
downloadmeta-freescale-60a283e1ca675296aa3675db41a5c866fa53d0f0.tar.gz
cicd: backport: Fix events allowing the workflow to run
Even when using pull_request_target, the merged is issued as pull_request and this should be used to ensure we can run the workflow. Signed-off-by: Vinicius Aquino <vinicius.aquino@ossystems.com.br>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/backport.yaml12
1 files changed, 1 insertions, 11 deletions
diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml
index 54dce5bc..cf317770 100644
--- a/.github/workflows/backport.yaml
+++ b/.github/workflows/backport.yaml
@@ -2,23 +2,13 @@ name: Backport labeled merged pull requests
2on: 2on:
3 pull_request_target: 3 pull_request_target:
4 types: [closed] 4 types: [closed]
5 issue_comment:
6 types: [created]
7jobs: 5jobs:
8 build: 6 build:
9 name: Create backport PRs 7 name: Create backport PRs
10 runs-on: ubuntu-latest 8 runs-on: ubuntu-latest
11 # Only run when pull request is merged 9 # Only run when pull request is merged
12 # or when a comment containing `/backport` is created 10 # or when a comment containing `/backport` is created
13 if: > 11 if: github.event.pull_request.merged
14 (
15 github.event_name == 'pull_request_target' &&
16 github.event.pull_request_target.merged
17 ) || (
18 github.event_name == 'issue_comment' &&
19 github.event.issue.pull_request_target &&
20 contains(github.event.comment.body, '/backport')
21 )
22 steps: 12 steps:
23 - uses: actions/checkout@v2 13 - uses: actions/checkout@v2
24 with: 14 with: