[Bug Fix] Rename devcontainer image to repo-owned ghcr package#413
Merged
Conversation
The docker-build job has failed on every main run since the monorepo unification (#358) with `denied: permission_denied: write_package` — the ghcr.io/ruby-ui/web-devcontainer package belongs to the archived ruby-ui/web repo, so this repo's GITHUB_TOKEN cannot push to it. Renaming to ghcr.io/ruby-ui/ruby_ui-devcontainer lets the first push create a fresh package linked to this repo with write access. The image is only used as a CI build cache (devcontainer.json builds from the local Dockerfile), so nothing consumes the old name.
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.
Problem
The Docker build (Devcontainer) job is red on every
mainrun since the monorepo unification (#358) — it has never passed:The build itself succeeds; the push to
ghcr.io/ruby-ui/web-devcontaineris denied. That package was created by the (now archived)ruby-ui/webrepo, which retains exclusive write access — this repo'sGITHUB_TOKENcan't push to it despitepackages: write.Fix
Rename the image to
ghcr.io/ruby-ui/ruby_ui-devcontainer. The first push from this repo auto-creates the package linked here with write access.Safe because the image is only a CI artifact/build cache —
docs/.devcontainer/devcontainer.jsonbuilds from the local Dockerfile; nothing pulls the old name (only references are inci.ymlitself). First run will misscacheFrom(slower build once), then cache normally.Alternative considered: granting this repo write access on the old package via org package settings — requires org admin UI action and keeps a stale name (
web-) from the pre-monorepo repo.Test steps
if: github.ref == 'refs/heads/main'), so it skips on this PR.ghcr.io/ruby-ui/ruby_ui-devcontainer:latestshould appear in org packages.Summary by cubic
Fixes the failing Devcontainer build on main by renaming the GHCR image to a repo-owned package. Pushes now go to
ghcr.io/ruby-ui/ruby_ui-devcontainer, so the workflow can create and push the image.imageNameandcacheFromin.github/workflows/ci.ymltoghcr.io/ruby-ui/ruby_ui-devcontainer.Written for commit 980ad6b. Summary will update on new commits.