Skip to content

Commit ef961cc

Browse files
committed
CI: use more generic version of build-results
this way only the `needs` list needs to be adapted and the step is fully generic. i wasn't aware of this trick when i first wrote `build-results`.
1 parent b3a44d8 commit ef961cc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/CI.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ jobs:
8888
name: Final Results
8989
if: ${{ always() }}
9090
runs-on: ubuntu-latest
91-
needs: [lib, stm32f4-event-printer]
91+
needs:
92+
- lib
93+
- stm32f4-event-printer
9294
steps:
93-
- name: check for failed builds of the library
94-
if: ${{ needs.lib.result != 'success' }}
95-
run: exit 1
96-
- name: check for failed builds of the example
97-
if: ${{ needs.stm32f4-event-printer.result != 'success' }}
98-
run: exit 1
95+
- name: "check for failed builds"
96+
run: |
97+
cat <<EOF | jq -e 'unique | all(. == "success")'
98+
${{ toJson(needs.*.result) }}
99+
EOF

0 commit comments

Comments
 (0)