Skip to content

Set GHCR package visibility to public on every release#965

Open
chrisyoung2005 wants to merge 1 commit intoRightNow-AI:mainfrom
chrisyoung2005:fix/ghcr-package-visibility
Open

Set GHCR package visibility to public on every release#965
chrisyoung2005 wants to merge 1 commit intoRightNow-AI:mainfrom
chrisyoung2005:fix/ghcr-package-visibility

Conversation

@chrisyoung2005
Copy link
Copy Markdown

@chrisyoung2005 chrisyoung2005 commented Apr 2, 2026

What

Fixes #961.

docker pull ghcr.io/rightnow-ai/openfang:<tag> returned 401 for unauthenticated users because GHCR defaults new packages to private, even when the repository is public. The release workflow was pushing the image but never setting visibility.

How

Two additions to the docker job in release.yml:

1. OCI labels on the build — links the package to the repository so GHCR associates them correctly. Standard practice for container images, and a prerequisite for the visibility API call to work reliably.

2. Post-push visibility step — calls the GitHub Packages API after each push to explicitly set the package public. The workflow already declares packages: write, which is the required scope. Running on every release tag means visibility cannot silently regress.

CI note

This PR touches only release.yml — no Rust code changes. The cargo check/test/clippy/fmt jobs will run but any failures are due to the pre-existing mcp.rs build blocker (tracked in #926, fix open in #927), not this PR.

Note on existing packages

This fix takes effect on the next release. The existing v0.5.6/v0.5.7 packages need a one-time manual change: GitHub → Packages → openfang → Package settings → Change visibility → Public. After that, this workflow step keeps them public automatically.

Verification

After the next release tag is pushed:

docker pull ghcr.io/rightnow-ai/openfang:latest  # succeeds without auth

GHCR defaults new packages to private, so docker pull
ghcr.io/rightnow-ai/openfang:... returned 401 for unauthenticated
users despite the repo being public.

Two changes to the docker job in release.yml:

1. Add OCI labels to the build — links the package to the repo so
   GHCR associates it correctly, and is standard practice for
   container images.

2. After each push, call the GitHub Packages API (PATCH
   /orgs/RightNow-AI/packages/container/openfang) to set visibility
   to public. The workflow already holds packages: write, which is
   the required scope. This runs on every release tag so visibility
   cannot regress if the package is ever reset.

Fixes RightNow-AI#961
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.

GHCR image ghcr.io/rightnow-ai/openfang:v0.5.6 returns 401 on unauthenticated pull

1 participant