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
This commit is contained in:
Igor 2023-11-14 16:15:47 +01:00 committed by GitHub
parent a1294f470e
commit e4e74c245f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -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 }}