From acf615229d47ed5c021a7fb0f20728ea0fe9021d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 18:02:13 +0200 Subject: [PATCH] build: fail gha-done check when required job fails (#51067) 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 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3e88d1738..05958d5f14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -441,8 +441,11 @@ jobs: permissions: contents: read needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, windows-x64, windows-x86, windows-arm64] - if: always() && github.repository == 'electron/electron' && !contains(needs.*.result, 'failure') + if: always() && github.repository == 'electron/electron' steps: + - name: Fail if any needed job failed or was cancelled + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 - name: GitHub Actions Jobs Done run: | echo "All GitHub Actions Jobs are done"