Repository navigation
fix(ci): skip provenance/sbom on PR container builds (#1373) - #1378
Conversation
PR container builds set load=true to import the resulting image into the local docker daemon for the smoke test. Buildx emits a manifest list when attestations (provenance/sbom) are enabled, even on single-platform builds, and the classic docker image store cannot import manifest lists via --load. The Container workflow has been red on every master push since #1319. Gate provenance/sbom on the push path so attestations are produced only when the image is published to ghcr.io (push to master, tag, or opt-in workflow_dispatch). PR smoke builds skip them and load cleanly. Closes #1373
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Gate
provenanceandsbomonsteps.decide.outputs.push == 'true'in.github/workflows/container.ymlso attestations are emitted only on push paths (master, tag, opt-in workflow_dispatch) where the image is published to GHCR. PR smoke builds, which setload: trueto import into the local docker daemon, no longer request attestations and therefore no longer produce a manifest list that the classic docker image store cannot import.Problem
The
Containerworkflow has been failing on every push tomastersince #1319 merged (2026-05-18), and on every PR that triggers it (dependabot #1357 / #1358 / #1359, etc.). Both matrix jobs (build (runtime)andbuild (distroless)) fail with:Root cause (see #1373):
docker/build-push-action@v6is configured withprovenance: true+sbom: true+load: ${{ steps.decide.outputs.push != 'true' }}. Buildx emits attestations as a manifest list even on a single-platform build, and the classic docker image store cannot import manifest lists via--load. The combination has never been compatible (docker/buildx#1533, docker/build-push-action#820). The previous inlined publish-container job inrelease.ymlpushed directly to ghcr.io and never hit--load, which is why the latent conflict only surfaced after #1319 introduced PR smoke builds.Solution
.github/workflows/container.yml:This is option 1 from the issue's recommended fixes — the minimal coherent change.
workflow_dispatchwithpush=true) still produce signed provenance + SBOM attestations on the published image, exactly as before.workflow_dispatchsmoke paths skip attestations. The single-platform image loads cleanly into the local docker daemon and the existingdocker run --rm --entrypoint ... --versionsmoke test runs unchanged.Alternatives rejected: containerd image store (needs runner-level daemon config, infeasible on hosted runners); OCI tarball + skopeo (more moving parts than the symptom warrants).
Verification
provenance/sbom/loadare the four lines edited in this PR.steps.decidealready gates the push/load decision symmetrically (push=false/load=trueonpull_request,push=true/no--loadon master/tag), so reusing that boolean for attestations preserves the published-artifact surface.build (runtime)andbuild (distroless)go green, and master/tag pushes continue to publish provenance- and SBOM-attested images.Closes #1373