Skip to content

Publish images under a repo-nested GHCR namespace - #12

Merged
16francej merged 1 commit into
mainfrom
ghcr-nested-image-names
Jul 29, 2026
Merged

Publish images under a repo-nested GHCR namespace#12
16francej merged 1 commit into
mainfrom
ghcr-nested-image-names

Conversation

@16francej

@16francej 16francej commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Every image build on this repository currently fails:

failed to push ghcr.io/yc-software/qm-admin:f081c0b:
403 Forbidden

The six qm-<name> packages were created by the repository this one was exported from. GHCR ties a package's Actions-write access to its originating repository, so the rename left them owned elsewhere and this repository's GITHUB_TOKEN cannot push to them.

The obvious fix — relink each package to this repository and flip it public — is the wrong one. Making an existing package public exposes every version it already holds, and those were all built from the pre-export tree. Same shape of mistake as reusing a repository that still carries refs/pull/*.

So: publish to a fresh namespace, and leave the old packages private and untouched on the archived repository.

ghcr.io/yc-software/qm/<name> nests the six under the repository name. A package created by this workflow is owned by this repository from its first push, so no manual relinking is ever needed. --certificate-identity already interpolates ${{ github.repository }}, so signing needs no change.

Only two lines actually referenced the GHCR path. The other ~120 qm-* hits in the tree are Fly app names, ECR repository names, and test fixtures — none of them registry paths.

Verification

test/release-workflows.test.ts pins the image path; its regex is updated with the workflow. That file plus test/removed-features.test.ts pass (9/9), and prettier is clean.

Not yet exercised end to end — the first dispatch after merge will create the six packages. They land private by default and need a one-time visibility flip to public, per package.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The qm-<name> packages belong to the repository this one was exported from,
so the new repository's GITHUB_TOKEN cannot push to them: every build fails
with 403 Forbidden on the blob HEAD.

Relinking those packages and making them public would expose every version
they already hold, all built from the pre-export tree. Publish to a fresh
namespace instead and leave the old packages private and untouched.

ghcr.io/yc-software/qm/<name> nests the six images under the repository name,
so a package created by this workflow is owned by this repository from the
first push. The cosign certificate identity already interpolates
github.repository and needs no change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@16francej
16francej merged commit 8d9370d into main Jul 29, 2026
15 checks passed
@16francej
16francej deleted the ghcr-nested-image-names branch July 29, 2026 22:57
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.

1 participant