Skip to content

Commit dc2bb0a

Browse files
committed
Add aggregator CI jobs for branch protection
Add a ci-pass-style gate job to each PR-triggered workflow that depends on all other jobs and fails if any of them failed or was cancelled. This allows requiring just three status checks (CI pass, Nix pass, Repository indexing pass) to block PR merges instead of listing every job and matrix cell individually.
1 parent a7c44f2 commit dc2bb0a

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,14 @@ jobs:
6666
export -f check_repo
6767
6868
parallel -j4 check_repo ::: circe/circe indeedeng/iwf-java-sdk
69+
70+
ci-pass:
71+
if: always()
72+
needs: [format, kotlin_plugin, docker_test]
73+
runs-on: ubuntu-latest
74+
name: CI pass
75+
steps:
76+
- if: >-
77+
contains(needs.*.result, 'failure') ||
78+
contains(needs.*.result, 'cancelled')
79+
run: exit 1

.github/workflows/nix.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,17 @@ jobs:
168168
169169
- run: du -h index.scip
170170
working-directory: examples/maven-example
171+
172+
nix-pass:
173+
if: always()
174+
needs: [flake-check, test, bazel, bazel_aspect, snapshots, maven]
175+
runs-on: ubuntu-latest
176+
name: Nix pass
177+
steps:
178+
- if: >-
179+
contains(needs.*.result, 'failure') ||
180+
contains(needs.*.result, 'cancelled')
181+
# The workflow-level shell wraps commands in `nix develop`, which
182+
# is unavailable here because this job doesn't install Nix.
183+
shell: bash
184+
run: exit 1

.github/workflows/repos.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,17 @@ jobs:
271271
fi
272272
exit 1
273273
fi
274+
275+
repos-pass:
276+
if: always()
277+
needs: [build-cli, index-repo]
278+
runs-on: ubuntu-latest
279+
name: Repository indexing pass
280+
steps:
281+
- if: >-
282+
contains(needs.*.result, 'failure') ||
283+
contains(needs.*.result, 'cancelled')
284+
# The workflow-level shell wraps commands in `nix develop`, which
285+
# is unavailable here because this job doesn't install Nix.
286+
shell: bash
287+
run: exit 1

0 commit comments

Comments
 (0)