Skip to content

Commit 1f9b945

Browse files
divyansh42pratap0007
authored andcommitted
Add CI summary job to the github workflows
Signed-off-by: divyansh42 <diagrawa@redhat.com>
1 parent 7d21139 commit 1f9b945

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,39 @@ jobs:
9797
e2e-tests:
9898
needs: [build]
9999
uses: ./.github/workflows/e2e-matrix.yml
100+
101+
ci-summary:
102+
name: CI summary
103+
if: always()
104+
needs:
105+
- build
106+
- linting
107+
- tests
108+
- generated
109+
- multi-arch-build
110+
- e2e-tests
111+
runs-on: ubuntu-latest
112+
steps:
113+
- name: Check job results
114+
run: |
115+
echo "build: ${{ needs.build.result }}"
116+
echo "linting: ${{ needs.linting.result }}"
117+
echo "tests: ${{ needs.tests.result }}"
118+
echo "generated: ${{ needs.generated.result }}"
119+
echo "multi-arch-build: ${{ needs.multi-arch-build.result }}"
120+
echo "e2e-tests: ${{ needs.e2e-tests.result }}"
121+
results=(
122+
"${{ needs.build.result }}"
123+
"${{ needs.linting.result }}"
124+
"${{ needs.tests.result }}"
125+
"${{ needs.generated.result }}"
126+
"${{ needs.multi-arch-build.result }}"
127+
"${{ needs.e2e-tests.result }}"
128+
)
129+
for result in "${results[@]}"; do
130+
if [[ "$result" != "success" && "$result" != "skipped" ]]; then
131+
echo "One or more jobs failed"
132+
exit 1
133+
fi
134+
done
135+
echo "All jobs passed or were skipped"

0 commit comments

Comments
 (0)