ci: Make sure that the ci-passed fails if any previous steps were not successful
This commit is contained in:
parent
1df5ab0851
commit
a00230829c
1 changed files with 9 additions and 2 deletions
11
.github/workflows/continuous-integration.yml
vendored
11
.github/workflows/continuous-integration.yml
vendored
|
|
@ -21,10 +21,17 @@ jobs:
|
||||||
# Quality gate to allow PR merge, used in the branch protection rules.
|
# Quality gate to allow PR merge, used in the branch protection rules.
|
||||||
ci-passed:
|
ci-passed:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-results, unix, flatpak]
|
needs: [main-build, test-results, unix, flatpak]
|
||||||
|
if: always()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: echo "✅ CI passed" > $GITHUB_STEP_SUMMARY
|
- name: Check all steps passed
|
||||||
|
run: |
|
||||||
|
if [[ ${{needs.main-build.result}} == 'success' && ${{needs.test-results.result}} == 'success' && ${{needs.unix.result}} == 'success' && ${{needs.flatpak.result}} == 'success' ]]; then
|
||||||
|
echo "✅ CI passed" > $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Summary of test results, combined from test result artifacts.
|
# Summary of test results, combined from test result artifacts.
|
||||||
# Runs even if the tests fail to provide a summary of the failures.
|
# Runs even if the tests fail to provide a summary of the failures.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue