Skip to content

Commit

Permalink
Use "not cancelled" in immediate post-gate CI jobs
Browse files Browse the repository at this point in the history
GitHub recommends avoiding `always()` where possible. Relying on the
cancellation check makes in possible to skip publishing more cleanly.

Refs:
* https://docs.github.com/en/actions/learn-github-actions/expressions#always
* https://docs.github.com/en/actions/managing-workflow-runs/canceling-a-workflow#steps-github-takes-to-cancel-a-workflow-run
  • Loading branch information
webknjaz committed Jun 7, 2024
1 parent f5597a0 commit 30a9da5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ jobs:
- check
- pre-setup # transitive, for accessing settings
if: >-
always()
!cancelled()
&& ! (
contains(needs.*.result, 'skipped')
|| contains(needs.*.result, 'failure')
Expand Down Expand Up @@ -1575,7 +1575,7 @@ jobs:
- check
- pre-setup # transitive, for accessing settings
if: >-
always()
!cancelled()
&& ! (
contains(needs.*.result, 'skipped')
|| contains(needs.*.result, 'failure')
Expand Down Expand Up @@ -1806,7 +1806,7 @@ jobs:
- check
- pre-setup # transitive, for accessing settings
if: >-
always()
!cancelled()
&& ! (
contains(needs.*.result, 'skipped')
|| contains(needs.*.result, 'failure')
Expand Down

0 comments on commit 30a9da5

Please sign in to comment.