ci: output a failure in the completion step if a previous step failed (#1128)

* ci: output a failure in the completion step if a previous step failed

* test

* okay now if I add failure

* yoink

* always

* use needs syntax
This commit is contained in:
Clement Tsang 2023-05-05 04:28:04 -04:00 committed by GitHub
parent 5548db6472
commit f237babb58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,7 +141,6 @@ jobs:
needs: pre-job
runs-on: ${{ matrix.info.os }}
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
continue-on-error: true
timeout-minutes: 20
strategy:
fail-fast: false
@ -258,8 +257,16 @@ jobs:
completion:
name: "CI Pass Check"
needs: [supported, other-check]
if: ${{ always() }}
runs-on: "ubuntu-latest"
steps:
- name: CI Passed
if: ${{ needs.supported.result == 'success' && needs.other-check.result == 'success' }}
run: |
echo "CI workflow completed."
echo "CI workflow completed successfully.";
- name: CI Failed
if: ${{ needs.supported.result != 'success' || needs.other-check.result != 'success' }}
run: |
echo "CI workflow failed at some point.";
exit 1;