fix: release.yml lowercase image name (hotfix promote to main)#48
Merged
Conversation
GHCR (like all OCI registries) requires lowercase image references.
github.repository_owner preserves the user's mixed-case login
("Setounkpe7"), so:
IMAGE_NAME=Setounkpe7/threat-intel-api
The metadata-action lowercases tags for the push step automatically,
so `docker push` succeeded on the first main-branch run. But our
env-built digest reference
${REGISTRY}/${IMAGE_NAME}@${digest}
-> ghcr.io/Setounkpe7/threat-intel-api@sha256:...
was passed verbatim to Trivy, cosign sign, cosign attest, and the
smoke-verify step. Trivy failed first on run 26557127655 with:
unable to initialize container image: failed to parse the image
name: could not parse reference
Aborting the rest of the chain — image was pushed to GHCR but never
got its CycloneDX SBOM attestation, cosign signature, or SLSA L2
build provenance.
Fix: insert a one-line step right after Checkout that tr-lowercases
IMAGE_NAME and writes it back to GITHUB_ENV. All downstream steps
then see the canonical lowercased value via env.IMAGE_NAME / IMAGE_NAME.
…e-name fix(release): lowercase IMAGE_NAME for GHCR refs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes the release.yml hotfix (PR #47) from `dev` to `main` so the next `release.yml` run produces a fully signed and SBOM-attested image.
Background: First main-branch `release.yml` run (26557127655) successfully pushed the image to GHCR at `ghcr.io/setounkpe7/threat-intel-api:sha-ff51baa` / `:main` / `:latest`, but the subsequent Trivy SBOM step failed because our env-built digest reference kept the uppercase `S` from `github.repository_owner`. The signing/attestation chain never ran.
This PR fixes that by lowercasing `IMAGE_NAME` in a step right after Checkout. On merge to `main`, `release.yml` re-fires and produces the missing signature + SBOM attestation + SLSA L2 provenance for the new merge-commit image.
Test plan
🤖 Generated with Claude Code