Skip to content

fix(ci): fail release when build attestation fails - #216

Open
paolodamico wants to merge 4 commits into
mainfrom
codex/fix-release-workflow-attestation-failure-handling
Open

fix(ci): fail release when build attestation fails#216
paolodamico wants to merge 4 commits into
mainfrom
codex/fix-release-workflow-attestation-failure-handling

Conversation

@paolodamico

@paolodamico paolodamico commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Ensure provenance attestation failures are fatal in the release workflow so container images cannot be published without provenance, closing the regression introduced by marking the attestation step continue-on-error.

Description

  • Remove the continue-on-error: true line from the Attest step in .github/workflows/release.yml so the docker-build job fails when attestation fails.

Testing

  • Validated the change by printing the workflow (sed -n '1,220p' .github/workflows/release.yml), inspecting the diff (git diff -- .github/workflows/release.yml), checking the edited lines (nl -ba .github/workflows/release.yml | sed -n '88,112p'), and committing the change (git commit), and all commands completed successfully.

Codex Task


Note

Medium Risk
Changes the release publish path for container images; a misconfigured promote step could leave tags stale or only partially updated, though runtime app code is unaffected.

Overview
The release workflow now blocks publishing latest and version tags until build provenance attestation succeeds, and fails the job if attestation fails (the continue-on-error bypass on the Attest step is removed).

Instead of tagging the image as latest/release version on the initial push, the first build only pushes a SHA reference. After attestation passes, a new step uses docker buildx imagetools create to point latest and the release version tag at the already-built, attested digest—so a failed attestation never advances consumer-facing tags.

Reviewed by Cursor Bugbot for commit c0e08f7. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 567965dd2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml Outdated
@@ -99,7 +99,6 @@ jobs:

- name: Attest
uses: actions/attest-build-provenance@v1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate image tags before failing on attestation

When the attestation service or registry write fails, this now fails the job only after the Docker Build step has already run with push: true and the metadata includes the release/latest tags. That leaves GHCR tags advanced to an unattested digest while create-github-release is skipped via needs: docker-build, producing a partial release instead of preventing publication. Gate the final tags on a successful attestation, such as pushing a staging/digest-only reference first and tagging the release only after attestation succeeds, before making this step fatal.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied - c0e08f7

paolodamico and others added 3 commits July 16, 2026 09:39
Push a sha-only image first, attest it, then retag latest/version so a failed attestation cannot advance release tags to an unattested digest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants