feat(ci): publish container image to ghcr.io#51
Merged
Conversation
Adds a multi-stage Dockerfile and a GHCR publish workflow that fires on master pushes (tagged :latest) and v* tags (tagged :X.Y.Z and :X.Y), so huly-cli can be pulled as ghcr.io/teslakoile/huly-cli alongside the existing PyPI distribution.
Adds an unprivileged huly user (uid 1000) to the runtime stage so the container doesn't run as root, pins the docker/* actions to exact patch versions matching publish-pypi.yml's pinning style, and removes the redundant branch-name tag (`latest` already covers default-branch pushes).
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.
Adds a container distribution channel for huly-cli on GitHub Container Registry, complementing the existing PyPI publish.
What changed
Dockerfile— multi-stagepython:3.12-slimbuild that produces a wheel in stage one and installs it into a clean runtime stage.ENTRYPOINT ["huly"]sodocker run ghcr.io/teslakoile/huly-cli ...behaves like the local CLI..dockerignore— keeps.git,tests/, caches, and.envfiles out of the build context..github/workflows/publish-ghcr.yml— builds and pushes onmaster(→:latest) and onv*tags (→:X.Y.Z,:X.Y,:latest) usingdocker/metadata-action. GHA cache enabled viatype=gha.Locally verified: image builds clean,
docker run --rm huly-cli:test --versionreturns0.1.7,--helprenders the full Typer command tree.Notes
docker pullis desired.permissions: packages: writeblock on the workflow should cover GHCR pushes without changing the org-level Actions permissions, but if the first run 403s, flip Settings → Actions → General → Workflow permissions to "Read and write."