Skip to content

Commit 19fed71

Browse files
ci: add Build Summary aggregator job
The matrix prune in this PR (`[11, 17, 21]` → `[17]` on PR) means the per-version check names (`build (11)`, `build (21)`) don't report on PR runs. Branch protection requires those names, so PRs get permanently blocked. Add a `Build Summary` aggregator that always runs, reflects the overall matrix result (success/skipped → green; failure → red), and emits a stable single check name regardless of matrix shape. Branch protection should require `Build Summary` instead of the per-version names — same pattern axonflow-enterprise uses with its `Build Summary` / `Test Summary` aggregators. Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
1 parent 12a62a2 commit 19fed71

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,26 @@ jobs:
9494
if: matrix.java-version == 17
9595
run: mvn jacoco:check -B
9696

97+
# Aggregator that always reports a single check name regardless of the
98+
# matrix shape (PR-time matrix is `[17]`; push/dispatch is `[11, 17, 21]`).
99+
# Branch protection requires `Build Summary`, not the per-version names,
100+
# so matrix changes don't strand required checks.
101+
build-summary:
102+
name: Build Summary
103+
needs: [build]
104+
if: always()
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Aggregate build matrix result
108+
run: |
109+
result="${{ needs.build.result }}"
110+
echo "build matrix result: $result"
111+
if [ "$result" != "success" ] && [ "$result" != "skipped" ]; then
112+
echo "::error::build matrix did not all pass (result: $result)"
113+
exit 1
114+
fi
115+
echo "Build matrix OK"
116+
97117
lint:
98118
runs-on: ubuntu-latest
99119

0 commit comments

Comments
 (0)