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 name: Generate artifacts on PR
# #
# If you comment "/build" to the PR comment this action will run compilation on PR # If PR is labeled with "Build" and you are a member of "Release manager" team it will start (additional security feature)
# but only if you are a member of "Release manager" team. As additional security feature
# #
on: on:
issue_comment: pull_request:
types: [created] types: [opened, reopened, edited, synchronize, review_requested, labeled]
workflow_dispatch:
concurrency: concurrency:
group: pipeline-pr-${{github.event.pull_request.number}} group: pipeline-pr-${{github.event.pull_request.number}}
@ -19,8 +17,8 @@ jobs:
permissions: permissions:
pull-requests: read pull-requests: read
name: "Permission to run compilation" name: "verify if compilation can be executed"
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/build') if: contains(github.event.pull_request.labels.*.name, 'Build')
runs-on: Linux runs-on: Linux
outputs: outputs:
member: ${{ steps.checkUserMember.outputs.isTeamMember }} member: ${{ steps.checkUserMember.outputs.isTeamMember }}