|
| 1 | +name: Build Gate |
| 2 | +# Single approval gate for fork/PR runs: a maintainer approves the `build-gate` |
| 3 | +# environment deployment once, releasing frogbot and every integration-test suite. |
| 4 | +# Replaces the per-workflow 'safe to test' label mechanism. |
| 5 | +on: |
| 6 | + pull_request_target: |
| 7 | + types: [opened, synchronize, reopened] |
| 8 | + branches: |
| 9 | + - "master" |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - "master" |
| 13 | + workflow_dispatch: |
| 14 | + |
| 15 | +# Ensures that only the latest commit is running for each PR at a time. |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +permissions: |
| 21 | + pull-requests: write |
| 22 | + contents: read |
| 23 | + |
| 24 | +jobs: |
| 25 | + # The single approval point. `build-gate` carries the Required-reviewers rule. |
| 26 | + # Trusted push & manual dispatch skip approval (empty environment name = no gate). |
| 27 | + gate: |
| 28 | + name: Approval gate |
| 29 | + runs-on: ubuntu-latest |
| 30 | + environment: ${{ github.event_name == 'pull_request_target' && 'build-gate' || '' }} |
| 31 | + steps: |
| 32 | + - run: echo "Approved — releasing frogbot and integration suites." |
| 33 | + |
| 34 | + # ---- Suites (each fans out behind the single gate) ---------------------- |
| 35 | + frogbot: |
| 36 | + needs: gate |
| 37 | + uses: ./.github/workflows/frogbot-scan-pull-request.yml |
| 38 | + secrets: inherit |
| 39 | + |
| 40 | + access: |
| 41 | + needs: gate |
| 42 | + # OIDC suite: caller must grant id-token so the reusable workflow can request it. |
| 43 | + permissions: |
| 44 | + id-token: write |
| 45 | + contents: read |
| 46 | + uses: ./.github/workflows/accessTests.yml |
| 47 | + secrets: inherit |
| 48 | + artifactory: |
| 49 | + needs: gate |
| 50 | + uses: ./.github/workflows/artifactoryTests.yml |
| 51 | + secrets: inherit |
| 52 | + conan: |
| 53 | + needs: gate |
| 54 | + uses: ./.github/workflows/conanTests.yml |
| 55 | + secrets: inherit |
| 56 | + distribution: |
| 57 | + needs: gate |
| 58 | + uses: ./.github/workflows/distributionTests.yml |
| 59 | + secrets: inherit |
| 60 | + docker: |
| 61 | + needs: gate |
| 62 | + uses: ./.github/workflows/dockerTests.yml |
| 63 | + secrets: inherit |
| 64 | + evidence: |
| 65 | + needs: gate |
| 66 | + uses: ./.github/workflows/evidenceTests.yml |
| 67 | + secrets: inherit |
| 68 | + ghost-frog: |
| 69 | + needs: gate |
| 70 | + uses: ./.github/workflows/ghostFrogTests.yml |
| 71 | + secrets: inherit |
| 72 | + go: |
| 73 | + needs: gate |
| 74 | + uses: ./.github/workflows/goTests.yml |
| 75 | + secrets: inherit |
| 76 | + gradle: |
| 77 | + needs: gate |
| 78 | + uses: ./.github/workflows/gradleTests.yml |
| 79 | + secrets: inherit |
| 80 | + helm: |
| 81 | + needs: gate |
| 82 | + # OIDC suite: caller must grant id-token so the reusable workflow can request it. |
| 83 | + permissions: |
| 84 | + id-token: write |
| 85 | + contents: read |
| 86 | + uses: ./.github/workflows/helmTests.yml |
| 87 | + secrets: inherit |
| 88 | + huggingface: |
| 89 | + needs: gate |
| 90 | + # OIDC suite: caller must grant id-token so the reusable workflow can request it. |
| 91 | + permissions: |
| 92 | + id-token: write |
| 93 | + contents: read |
| 94 | + uses: ./.github/workflows/huggingfaceTests.yml |
| 95 | + secrets: inherit |
| 96 | + lifecycle: |
| 97 | + needs: gate |
| 98 | + uses: ./.github/workflows/lifecycleTests.yml |
| 99 | + secrets: inherit |
| 100 | + maven: |
| 101 | + needs: gate |
| 102 | + uses: ./.github/workflows/mavenTests.yml |
| 103 | + secrets: inherit |
| 104 | + nix: |
| 105 | + needs: gate |
| 106 | + uses: ./.github/workflows/nixTests.yml |
| 107 | + secrets: inherit |
| 108 | + npm: |
| 109 | + needs: gate |
| 110 | + uses: ./.github/workflows/npmTests.yml |
| 111 | + secrets: inherit |
| 112 | + nuget: |
| 113 | + needs: gate |
| 114 | + uses: ./.github/workflows/nugetTests.yml |
| 115 | + secrets: inherit |
| 116 | + oidc: |
| 117 | + needs: gate |
| 118 | + # OIDC suite: caller must grant id-token so the reusable workflow can request it. |
| 119 | + permissions: |
| 120 | + id-token: write |
| 121 | + contents: read |
| 122 | + uses: ./.github/workflows/oidcTests.yml |
| 123 | + secrets: inherit |
| 124 | + plugins: |
| 125 | + needs: gate |
| 126 | + uses: ./.github/workflows/pluginsTests.yml |
| 127 | + secrets: inherit |
| 128 | + pnpm: |
| 129 | + needs: gate |
| 130 | + uses: ./.github/workflows/pnpmTests.yml |
| 131 | + secrets: inherit |
| 132 | + podman: |
| 133 | + needs: gate |
| 134 | + uses: ./.github/workflows/podmanTests.yml |
| 135 | + secrets: inherit |
| 136 | + poetry: |
| 137 | + needs: gate |
| 138 | + uses: ./.github/workflows/poetryTests.yml |
| 139 | + secrets: inherit |
| 140 | + python: |
| 141 | + needs: gate |
| 142 | + uses: ./.github/workflows/pythonTests.yml |
| 143 | + secrets: inherit |
| 144 | + script: |
| 145 | + needs: gate |
| 146 | + uses: ./.github/workflows/scriptTests.yml |
| 147 | + secrets: inherit |
| 148 | + transfer: |
| 149 | + needs: gate |
| 150 | + uses: ./.github/workflows/transferTests.yml |
| 151 | + secrets: inherit |
| 152 | + uv: |
| 153 | + needs: gate |
| 154 | + uses: ./.github/workflows/uvTests.yml |
| 155 | + secrets: inherit |
| 156 | + |
| 157 | + # Single, stable required status check. Point branch protection at |
| 158 | + # "Build Gate / build-gate-success" instead of the matrix-expanded suite checks. |
| 159 | + # Recover a failed suite with "Re-run failed jobs" (re-runs the suite + this job, |
| 160 | + # not the approval gate) — no re-approval and no new commit needed. |
| 161 | + build-gate-success: |
| 162 | + name: build-gate-success |
| 163 | + if: always() |
| 164 | + needs: |
| 165 | + - gate |
| 166 | + - frogbot |
| 167 | + - access |
| 168 | + - artifactory |
| 169 | + - conan |
| 170 | + - distribution |
| 171 | + - docker |
| 172 | + - evidence |
| 173 | + - ghost-frog |
| 174 | + - go |
| 175 | + - gradle |
| 176 | + - helm |
| 177 | + - huggingface |
| 178 | + - lifecycle |
| 179 | + - maven |
| 180 | + - nix |
| 181 | + - npm |
| 182 | + - nuget |
| 183 | + - oidc |
| 184 | + - plugins |
| 185 | + - pnpm |
| 186 | + - podman |
| 187 | + - poetry |
| 188 | + - python |
| 189 | + - script |
| 190 | + - transfer |
| 191 | + - uv |
| 192 | + runs-on: ubuntu-latest |
| 193 | + steps: |
| 194 | + - name: Verify no suite failed or was cancelled |
| 195 | + run: | |
| 196 | + if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then |
| 197 | + echo "::error::One or more suites failed or were cancelled." |
| 198 | + exit 1 |
| 199 | + fi |
| 200 | + echo "All suites succeeded (skipped suites are allowed)." |
0 commit comments