From e4e74c245fb974bfb350e74ed5725c457f4dbe6b Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 14 Nov 2023 16:15:47 +0100 Subject: [PATCH] For getting a PR SHA, action needs to be executed from PR (#5910) * For getting a PR SHA, action needs to be executed from PR * Change PR compilation to label & team check --- .github/workflows/build-artifacts-pr.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-artifacts-pr.yml b/.github/workflows/build-artifacts-pr.yml index 8dbefb53a..820e3858f 100644 --- a/.github/workflows/build-artifacts-pr.yml +++ b/.github/workflows/build-artifacts-pr.yml @@ -1,13 +1,11 @@ name: Generate artifacts on PR # -# If you comment "/build" to the PR comment this action will run compilation on PR -# but only if you are a member of "Release manager" team. As additional security feature +# If PR is labeled with "Build" and you are a member of "Release manager" team it will start (additional security feature) # on: - issue_comment: - types: [created] - workflow_dispatch: + pull_request: + types: [opened, reopened, edited, synchronize, review_requested, labeled] concurrency: group: pipeline-pr-${{github.event.pull_request.number}} @@ -19,8 +17,8 @@ jobs: permissions: pull-requests: read - name: "Permission to run compilation" - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/build') + name: "verify if compilation can be executed" + if: contains(github.event.pull_request.labels.*.name, 'Build') runs-on: Linux outputs: member: ${{ steps.checkUserMember.outputs.isTeamMember }}