diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2021-08-09 10:45:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 10:45:30 -0300 |
commit | f1eae1b9151ec12fd4e92edb29a04acf9f6c9ce4 (patch) | |
tree | 01511df000de6bcf95ed7f28b1dda0a322bbe9f6 | |
parent | 80669e3e60c2c11be29c50d5b463a65865088750 (diff) | |
parent | 60a283e1ca675296aa3675db41a5c866fa53d0f0 (diff) | |
download | meta-freescale-f1eae1b9151ec12fd4e92edb29a04acf9f6c9ce4.tar.gz |
Merge pull request #840 from Ossanes/topic/cicd
cicd: backport: Fix events allowing the workflow to run
-rw-r--r-- | .github/workflows/backport.yaml | 12 |
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 | |||
2 | on: | 2 | on: |
3 | pull_request_target: | 3 | pull_request_target: |
4 | types: [closed] | 4 | types: [closed] |
5 | issue_comment: | ||
6 | types: [created] | ||
7 | jobs: | 5 | jobs: |
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: |