From 60a283e1ca675296aa3675db41a5c866fa53d0f0 Mon Sep 17 00:00:00 2001 From: Vinicius Aquino Date: Mon, 9 Aug 2021 10:15:38 -0300 Subject: 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 --- .github/workflows/backport.yaml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to '.github/workflows') 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 on: pull_request_target: types: [closed] - issue_comment: - types: [created] jobs: build: name: Create backport PRs runs-on: ubuntu-latest # Only run when pull request is merged # or when a comment containing `/backport` is created - if: > - ( - 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') - ) + if: github.event.pull_request.merged steps: - uses: actions/checkout@v2 with: -- cgit v1.2.3-54-g00ecf