Conversation
Add GHCR push support alongside existing Docker Hub push. New naming: ghcr.io/coder/$TAG:$IMAGE (e.g., ghcr.io/coder/ubuntu:base). Docker Hub images continue to be pushed for backwards compatibility. Closes #291
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
Publish images to GHCR as
ghcr.io/coder/$DISTRO:$IMAGE(e.g.images/base/ubuntu.Dockerfile->ghcr.io/coder/ubuntu:base). Docker Hub images keep being pushed unchanged for backwards compatibility, per the plan in #291.Closes #291
Changes
scripts/push_images.sh: add--registry=dockerhub|ghcr.io(defaultdockerhub, unknown values rejected). GHCR pushes{image},{image}-{date},{image}-{version},{image}-{version}-{date}tags, mirroring the Docker Hub tag variants (version fromubuntu_version_for, souniversalgets-noble)..github/workflows/build.yaml: add GHCR login (GITHUB_TOKEN) and push steps, non-PR events only.packages: writeis scoped to theimagesjob; the workflow default stayspackages: none.README.md: document GHCR naming and tags.Validation
shellcheck,actionlint,dprint checkpass.depotand fake build metadata:--registry=ghcr.ioemits 36 tags (4 per image x 9 images), e.g.ghcr.io/coder/ubuntu:base-resolute-20260928,ghcr.io/coder/ubuntu:universal-noble.main.--registry=quay.ioexits with usage.Note
The first push creates the
ghcr.io/coder/ubuntupackage. The org must allowGITHUB_TOKENto create packages, and the package visibility needs to be set to public after the first run.