ci: implement dynamic environment priority gate (prod > rc > testing > branch)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 34s
Build & Deploy / 🧪 QA (push) Successful in 1m32s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-06-15 16:14:16 +02:00
parent d2bf48fc60
commit 145bff90b6
2 changed files with 91 additions and 4 deletions

View File

@@ -17,10 +17,6 @@ env:
PUPPETEER_SKIP_DOWNLOAD: "true"
COREPACK_NPM_REGISTRY: "https://registry.npmmirror.com"
concurrency:
# Group by target environment: new RC cancels old RC, but doesn't cancel Prod.
group: ${{ github.workflow }}-${{ github.ref_type == 'tag' && (contains(github.ref_name, '-') && 'staging' || 'production') || (github.ref_name == 'main' && 'testing' || format('branch-{0}', github.ref_name)) }}
cancel-in-progress: true
jobs:
# ──────────────────────────────────────────────────────────────────────────────
@@ -147,6 +143,13 @@ jobs:
echo "short_sha=$SHORT_SHA"
} >> "$GITHUB_OUTPUT"
- name: 🚦 Priority Gate
env:
GITEA_PAT: ${{ secrets.GITEA_PAT }}
CURRENT_RUN_ID: ${{ github.run_id }}
CURRENT_TARGET: ${{ steps.determine.outputs.target }}
run: bash scripts/priority-gate.sh
# ──────────────────────────────────────────────────────────────────────────────
# JOB 2: QA (Lint, Typecheck, Test)
# ──────────────────────────────────────────────────────────────────────────────