Skip to content
This repository was archived by the owner on Jun 14, 2026. It is now read-only.

Commit d0935d8

Browse files
testclaude
authored andcommitted
Fix pr.yml docker_build/e2e skipped-dependency cascade
docker_build needs type_check (and other path-gated jobs). On a same-repo Rust-only PR, type_check is skipped, and because the job's if lacked a status function the skip cascaded: docker_build and e2e_test were skipped even though their *_needed flags were true, so the Required gate failed. Use the canonical always() idiom so both jobs run when needed regardless of skipped siblings, blocking only on real failures or cancellations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 72fbcf2 commit d0935d8

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/pr.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ jobs:
188188
# Same-repo only: forks cannot write to GHCR via `secrets.GITHUB_TOKEN`.
189189
docker_build:
190190
needs: [ prepare, lint, type_check, unit_test, integration_test, security_audit ]
191-
if: needs.prepare.outputs.docker_build_needed == 'true'
191+
if: >-
192+
always() &&
193+
needs.prepare.outputs.docker_build_needed == 'true' &&
194+
!contains(needs.*.result, 'failure') &&
195+
!contains(needs.*.result, 'cancelled')
192196
# Job-level permissions override the workflow-level ceiling so the called
193197
# reusable can declare `packages: write` without it being capped to `none`.
194198
permissions:
@@ -200,7 +204,10 @@ jobs:
200204
# Same-repo only: forks cannot pull from GHCR via `secrets.GITHUB_TOKEN`.
201205
e2e_test:
202206
needs: [ prepare, docker_build ]
203-
if: needs.prepare.outputs.e2e_test_needed == 'true'
207+
if: >-
208+
always() &&
209+
needs.prepare.outputs.e2e_test_needed == 'true' &&
210+
needs.docker_build.result == 'success'
204211
permissions:
205212
contents: read
206213
packages: read

0 commit comments

Comments
 (0)