mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
ci: reorganize PR resolver scripts
This commit is contained in:
10 files changed
+152
-11
No files matched your search
@@ -45,11 +45,28 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: ./scripts/meta/resolve/pr_scope.sh
|
||||
run: ./scripts/meta/resolve/pr/scope.sh
|
||||
|
||||
validate-pr-branch-prefix:
|
||||
name: 🧭 Validate PR branch prefix
|
||||
needs: detect-pr-scope
|
||||
if: ${{ github.event_name == 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Validate branch prefix for detected scope
|
||||
env:
|
||||
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||
PR_SCOPE: ${{ needs.detect-pr-scope.outputs.scope }}
|
||||
run: ./scripts/meta/resolve/pr/branch_prefix.sh
|
||||
|
||||
pr-scope-gate:
|
||||
name: 🚦 Gate PR scope
|
||||
needs: detect-pr-scope
|
||||
needs:
|
||||
- detect-pr-scope
|
||||
- validate-pr-branch-prefix
|
||||
if: ${{ needs.detect-pr-scope.outputs.run_ci_orchestrator == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -60,14 +77,18 @@ jobs:
|
||||
echo "Lightweight PR scope '${{ needs.detect-pr-scope.outputs.scope }}' passed."
|
||||
|
||||
ci-orchestrator:
|
||||
needs: detect-pr-scope
|
||||
needs:
|
||||
- detect-pr-scope
|
||||
- validate-pr-branch-prefix
|
||||
if: ${{ github.event_name == 'pull_request' && needs.detect-pr-scope.outputs.run_ci_orchestrator == 'true' }}
|
||||
uses: ./.github/workflows/ci-orchestrator.yml
|
||||
with:
|
||||
distros: "arch debian ubuntu fedora centos"
|
||||
|
||||
prepare-fork-merge-ref:
|
||||
needs: detect-pr-scope
|
||||
needs:
|
||||
- detect-pr-scope
|
||||
- validate-pr-branch-prefix
|
||||
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && needs.detect-pr-scope.outputs.run_ci_orchestrator == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@@ -82,7 +103,7 @@ jobs:
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
PR_MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha || '' }}
|
||||
run: ./scripts/meta/resolve/pr_merge_ref.sh
|
||||
run: ./scripts/meta/resolve/pr/merge_ref.sh
|
||||
|
||||
build-ci-images-fork:
|
||||
needs: prepare-fork-merge-ref
|
||||
|
||||
Reference in new issue
Block a user