Skip to content

Commit

Permalink
CI: fix semantics of the required check.
Browse files Browse the repository at this point in the history
If a dependency of the `required` check, e.g. `test-software` fails,
the `required` check as a whole is considered skipped. While this works
as expected for gating PR merges, it does not work the same way in
the merge queue: in the latter case, the non-successful status does not
prevent the merge queue branch from being merged to `main`.

To address this, apply a workaround such that the `required` check
always runs and programmatically checks the status of the required jobs
rather than delegating this to GHA flow graph.
  • Loading branch information
whitequark committed Oct 23, 2023
1 parent 4908ceb commit 6c59f4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ jobs:
- test-software
- build-firmware
- build-manual
if: always() && !contains(needs.*.result, 'cancelled')
runs-on: ubuntu-latest
steps:
- run: |
true
- run: ${{ contains(needs.*.result, 'failure') && 'false' || 'true' }}

publish-manual:
needs: build-manual
Expand Down

0 comments on commit 6c59f4b

Please sign in to comment.