There was an error while loading. Please reload this page.
1 parent b6ccab9 commit 31677c0Copy full SHA for 31677c0
1 file changed
.github/workflows/aggregator.yml
@@ -0,0 +1,32 @@
1
+name: Aggregated CI Status
2
+on:
3
+ workflow_call:
4
+ inputs:
5
+ jobs:
6
+ description: "List of job names to aggregate"
7
+ required: true
8
+ type: string
9
+
10
+jobs:
11
+ aggregator:
12
+ name: Aggregated CI Status
13
+ runs-on: ubuntu-latest
14
+ if: ${{ always() }}
15
+ needs: ${{ fromJson(inputs.jobs) }}
16
+ steps:
17
+ - name: Aggregate results
18
+ run: |
19
+ failed=()
20
+ for job in ${{ inputs.jobs }}; do
21
+ result=$(eval echo '${{ needs.'$job'.result }}')
22
+ if [ "$result" != "success" ]; then
23
+ failed+=("$job")
24
+ fi
25
+ done
26
27
+ if [ ${#failed[@]} -ne 0 ]; then
28
+ echo "❌ Failed jobs: ${failed[*]}"
29
+ exit 1
30
31
32
+ echo "✅ All required jobs succeeded"
0 commit comments