Skip to content

Commit

Permalink
Run at PR comment /build and improve security
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Nov 6, 2023
1 parent da909b2 commit cfaa290
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-artifacts-pr.yml
@@ -1,12 +1,13 @@
name: Generate artifacts on PR
#
# Update artifacts on PR if developers is a part of Armbian board maintainers team
# 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
#

on:
issue_comment:
types: [created]
workflow_dispatch:
pull_request:
types: [opened, reopened, edited, synchronize]

concurrency:
group: pipeline-pr-${{github.event.pull_request.number}}
Expand All @@ -17,7 +18,7 @@ jobs:
Check:

name: "Permission to run compilation"
if: ${{ github.repository_owner == 'Armbian' }}
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/build') && github.repository_owner == 'Armbian'
runs-on: Linux
outputs:
member: ${{ steps.checkUserMember.outputs.isTeamMember }}
Expand All @@ -28,7 +29,7 @@ jobs:
with:
username: ${{ github.actor }}
organization: armbian
team: "Board Maintainers"
team: "Release manager"
GITHUB_TOKEN: ${{ secrets.ORG_MEMBERS }}

Compile:
Expand Down

0 comments on commit cfaa290

Please sign in to comment.