Skip to content

Commit e6f0597

Browse files
committed
fix(ci): run Docker release after aggregate gate
1 parent ae217b6 commit e6f0597

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,10 @@ jobs:
529529
release:
530530
name: build, scan, and publish Docker release
531531
needs: ci
532-
if: needs.ci.result == 'success' && github.event_name == 'push' && github.ref == 'refs/heads/main'
532+
# The aggregate gate intentionally depends on PR-only Docker jobs, which
533+
# are skipped on pushes. Force evaluation past GitHub's transitive skipped-
534+
# dependency propagation, then admit only a successful trusted main push.
535+
if: always() && needs.ci.result == 'success' && github.event_name == 'push' && github.ref == 'refs/heads/main'
533536
permissions:
534537
contents: read
535538
packages: write

scripts/docker-release-contract.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe("Docker release trust gate", () => {
2020
expect(release).not.toContain("workflow_dispatch:");
2121
expect(ci).toMatch(/^ {2}release:\n/m);
2222
expect(ci).toContain("needs: ci");
23+
expect(ci).toContain("if: always() && needs.ci.result == 'success'");
2324
expect(ci).toContain("needs.ci.result == 'success'");
2425
expect(ci).toContain("github.event_name == 'push'");
2526
expect(ci).toContain("github.ref == 'refs/heads/main'");

0 commit comments

Comments
 (0)