Merge pull request #156 from Ossanes/topic/cicd

cicd: backport: Fix events allowing the workflow to run
This commit is contained in:
Otavio Salvador 2021-08-09 12:36:00 -03:00 committed by GitHub
commit 8a977f5b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,23 +2,13 @@ name: Backport labeled merged pull requests
on: on:
pull_request_target: pull_request_target:
types: [closed] types: [closed]
issue_comment:
types: [created]
jobs: jobs:
build: build:
name: Create backport PRs name: Create backport PRs
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only run when pull request is merged # Only run when pull request is merged
# or when a comment containing `/backport` is created # or when a comment containing `/backport` is created
if: > if: github.event.pull_request.merged
(
github.event_name == 'pull_request_target' &&
github.event.pull_request_target.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request_target &&
contains(github.event.comment.body, '/backport')
)
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with: