Skip to content

fix(ci): skip provenance/sbom on PR container builds (#1373) - #1378

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/container-build-load-1373
May 19, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/container-build-load-1373

Conversation

@Sinity

@Sinity Sinity commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Gate provenance and sbom on steps.decide.outputs.push == 'true' in .github/workflows/container.yml so attestations are emitted only on push paths (master, tag, opt-in workflow_dispatch) where the image is published to GHCR. PR smoke builds, which set load: true to 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 Container workflow has been failing on every push to master since #1319 merged (2026-05-18), and on every PR that triggers it (dependabot #1357 / #1358 / #1359, etc.). Both matrix jobs (build (runtime) and build (distroless)) fail with:

ERROR: failed to build: docker exporter does not currently support exporting manifest lists

Root cause (see #1373): docker/build-push-action@v6 is configured with provenance: 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 in release.yml pushed 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:

provenance: ${{ steps.decide.outputs.push == 'true' }}
sbom:       ${{ steps.decide.outputs.push == 'true' }}

This is option 1 from the issue's recommended fixes — the minimal coherent change.

  • Push paths (master, tag, workflow_dispatch with push=true) still produce signed provenance + SBOM attestations on the published image, exactly as before.
  • PR / workflow_dispatch smoke paths skip attestations. The single-platform image loads cleanly into the local docker daemon and the existing docker run --rm --entrypoint ... --version smoke test runs unchanged.
  • No code paths touched; no other workflows touched; behavior on published images is preserved.

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

  • Reviewed the failing workflow definition and confirmed the only call sites for provenance/sbom/load are the four lines edited in this PR.
  • Confirmed steps.decide already gates the push/load decision symmetrically (push=false/load=true on pull_request, push=true/no --load on master/tag), so reusing that boolean for attestations preserves the published-artifact surface.
  • The actual smoke is the Container workflow run on this PR; expectation: both build (runtime) and build (distroless) go green, and master/tag pushes continue to publish provenance- and SBOM-attested images.

Closes #1373

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
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 33 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0f712ec7-ca89-4b6e-a003-10b57dfb7714

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1a2cc and 570418f.

📒 Files selected for processing (1)
  • .github/workflows/container.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/container-build-load-1373

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit cecf748 into master May 19, 2026
1 of 4 checks passed
@Sinity
Sinity deleted the feature/fix/container-build-load-1373 branch May 19, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container build broken on master: provenance/sbom + --load incompatible

1 participant