Publish images under a repo-nested GHCR namespace - #12
Merged
Conversation
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>
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.
Every image build on this repository currently fails:
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'sGITHUB_TOKENcannot 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-identityalready 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.tspins the image path; its regex is updated with the workflow. That file plustest/removed-features.test.tspass (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
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.