From: Vinicius Aquino Date: Tue, 6 Jul 2021 20:07:16 +0000 (-0300) Subject: cicd: Use pull_request_target instead of pull_request X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=refs%2Fpull%2F824%2Fhead;p=meta-freescale.git 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 --- 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 @@ name: Backport labeled merged pull requests on: - pull_request: + pull_request_target: types: [closed] issue_comment: types: [created] @@ -12,11 +12,11 @@ jobs: # or when a comment containing `/backport` is created if: > ( - github.event_name == 'pull_request' && - 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 && + github.event.issue.pull_request_target && contains(github.event.comment.body, '/backport') ) steps: