Skip to content

Commit 0dd1486

Browse files
claude[bot]MarshallOfSoundclaude
authored
build: fail gha-done when required or checkout jobs fail (#52252)
* build: fail gha-done check when required job fails (#50959) fix: fail gha-done when any required job failed Previously, the `gha-done` gate job used an `if:` expression that evaluated to false whenever any needed job reported a failure, which caused the job to be *skipped* rather than *failed*. GitHub branch protection treats skipped required checks as non-blocking, so a PR could be marked mergeable even though one of its test jobs had failed. Keep the job always running and move the failure check into a step that explicitly exits 1 when any dependency failed or was cancelled, so the "GitHub Actions Completed" required check actually blocks the merge in that case. Notes: none * ci: fail gha-done when checkout jobs fail (#52245) build: fail gha-done when checkout jobs fail Claude-Session: https://claude.ai/code/session_01VR19UDbfbBMeFzWGUQehCq Co-authored-by: Claude <[email protected]> --------- Co-authored-by: Samuel Attard <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent 4c3df5b commit 0dd1486

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,12 @@ jobs:
436436
runs-on: ubuntu-latest
437437
permissions:
438438
contents: read
439-
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, build-siso, windows-x64, windows-x86, windows-arm64]
440-
if: always() && !contains(needs.*.result, 'failure')
439+
needs: [docs-only, checkout-macos, checkout-linux, checkout-windows, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, build-siso, windows-x64, windows-x86, windows-arm64]
440+
if: always() && github.repository == 'electron/electron'
441441
steps:
442+
- name: Fail if any needed job failed or was cancelled
443+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
444+
run: exit 1
442445
- name: GitHub Actions Jobs Done
443446
run: |
444447
echo "All GitHub Actions Jobs are done"

0 commit comments

Comments
 (0)