Fix Docker image tags to be lowercase for GHCR - #25
Merged
Conversation
The v0.5.0 release build failed with:
invalid tag "ghcr.io/DecaturMakers/kiosk-show-replacement:0.5.0":
repository name must be lowercase
GHCR (and the Docker tag spec) require repository names to be all
lowercase, but ${{ github.repository }} preserves the owner's casing.
This worked under the previous all-lowercase "jantman" owner and broke
once the repo moved to the mixed-case "DecaturMakers" organization.
Add a "Compute lowercase image name" step to both the release and CI
Docker build jobs that lowercases $GITHUB_REPOSITORY via bash ${VAR,,}
expansion, and reference its output for all ghcr.io image tags
(release version/latest tags, the CI ci-<sha> tag) and the docker pull
commands in the release notes body.
OCI image labels and GitHub URLs are left using ${{ github.repository }}
since those are case-insensitive and not subject to the tag constraint.
Once merged, the release workflow will re-run (0.5.0 > the 0.4.0 latest
release) and publish the v0.5.0 image and GitHub release.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes GHCR/Docker tag generation in the CI and Release workflows by ensuring the image repository name is always lowercase (required by GHCR), avoiding failures when the GitHub org name contains uppercase characters.
Changes:
- Add a “Compute lowercase image name” step that lowercases
$GITHUB_REPOSITORYand exposes it assteps.image.outputs.name. - Update Docker build/push tags to use the computed lowercase image name in both Release and CI.
- Update the Release notes’
docker pullcommands to use the computed lowercase image name.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/release.yml | Computes a lowercase GHCR image name and uses it for release tags and release-notes pull commands. |
| .github/workflows/ci.yml | Computes a lowercase GHCR image name and uses it for CI image tagging. |
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 v0.5.0 Release build (on the merge of #24) failed:
GHCR and the Docker tag spec require repository names to be entirely lowercase. The workflows tag images as
ghcr.io/${{ github.repository }}:..., and${{ github.repository }}preserves the owner's casing —DecaturMakers/kiosk-show-replacement. This was fine under the old all-lowercasejantmanowner but breaks under the mixed-case org.Fix
Add a Compute lowercase image name step to both the Release and CI Docker-build jobs that lowercases
$GITHUB_REPOSITORYwith bash${VAR,,}expansion, and reference its output (steps.image.outputs.name) for:version/latestimage tagsci-<sha>image tagdocker pullcommands in the release-notes bodyOCI labels and GitHub URLs keep
${{ github.repository }}— they're case-insensitive and not subject to the tag constraint.Effect
The failed run errored before the "Create GitHub Release" step, so no v0.5.0 tag/release exists yet. Once this merges to
main, the Release workflow re-triggers (pyproject0.5.0> latest release0.4.0) and should publish the v0.5.0 image and GitHub release.🤖 Generated with Claude Code