mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Enable artifacts creation at pull request (#5804)
* Add action for artifacts creation at pull request * Run at PR comment /build and improve security
This commit is contained in:
47
.github/workflows/build-artifacts-pr.yml
vendored
Normal file
47
.github/workflows/build-artifacts-pr.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
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
|
||||
#
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: pipeline-pr-${{github.event.pull_request.number}}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Check:
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
name: "Permission to run compilation"
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/build')
|
||||
runs-on: Linux
|
||||
outputs:
|
||||
member: ${{ steps.checkUserMember.outputs.isTeamMember }}
|
||||
steps:
|
||||
|
||||
- uses: tspascoal/get-user-teams-membership@v2
|
||||
id: checkUserMember
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
organization: armbian
|
||||
team: "Release manager"
|
||||
GITHUB_TOKEN: ${{ secrets.ORG_MEMBERS }}
|
||||
|
||||
Compile:
|
||||
|
||||
needs: Check
|
||||
name: "Update artifacts"
|
||||
if: ${{ github.repository_owner == 'Armbian' && needs.Check.outputs.member == 'true' }}
|
||||
uses: armbian/os/.github/workflows/complete-artifact-matrix-all.yml@main
|
||||
secrets:
|
||||
ORG_MEMBERS: ${{ secrets.ORG_MEMBERS }}
|
||||
with:
|
||||
extraParamsAllBuilds: "UPLOAD_TO_OCI_ONLY=no"
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: pipeline-security-${{github.event.pull_request.number}}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Analysis:
|
||||
|
||||
4
.github/workflows/lint-scripts-pr.yml
vendored
4
.github/workflows/lint-scripts-pr.yml
vendored
@@ -11,6 +11,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: pipeline-lint-${{github.event.pull_request.number}}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Shellcheck:
|
||||
|
||||
Reference in New Issue
Block a user