Skip to content

Commit

Permalink
ci: fix CI pass check conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Sep 3, 2024
1 parent 78879fc commit bd1b383
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,22 @@ jobs:
completion:
name: "CI Pass Check"
needs: [supported, other-check, vm-check]
if: ${{ always() }}
if: ${{ needs.supported.result != 'skipped' && needs.other-check.result != 'skipped' && needs.vm-check.result != 'skipped' }}
runs-on: "ubuntu-latest"
steps:
- name: CI Passed
if: ${{ (needs.supported.result == 'success' && needs.other-check.result == 'success') || (needs.supported.result == 'skipped' && needs.other-check.result == 'skipped') }}
if: ${{ needs.supported.result == 'success' && needs.other-check.result == 'success' && needs.vm-check.result == 'success' }}
run: |
echo "CI workflow completed successfully or was skipped.";
echo "CI workflow completed successfully.";
- name: CI Failed
if: ${{ needs.supported.result == 'failure' && needs.other-check.result == 'failure' || (needs.supported.result == 'cancelled' && needs.other-check.result == 'cancelled') }}
if: ${{ needs.supported.result == 'failure' && needs.other-check.result == 'failure' && needs.vm-check.result == 'failure' }}
run: |
echo "CI workflow failed or was cancelled at some point.";
echo "CI workflow failed.";
exit 1;
- name: CI Cancelled
if: ${{ needs.supported.result == 'cancelled' && needs.other-check.result == 'cancelled' && needs.vm-check.result == 'cancelled' }}
run: |
echo "CI workflow was cancelled.";
exit 1;

0 comments on commit bd1b383

Please sign in to comment.