Skip to content

ci: lowercase the GHCR image tag for the mcp-server publish job#154

Open
hanwencheng wants to merge 1 commit into
mainfrom
claude/fix-ghcr-image-tag
Open

ci: lowercase the GHCR image tag for the mcp-server publish job#154
hanwencheng wants to merge 1 commit into
mainfrom
claude/fix-ghcr-image-tag

Conversation

@hanwencheng
Copy link
Copy Markdown
Member

Problem

The image job in .github/workflows/mcp-server.yml (build + publish the mcp-server container) tagged the image ghcr.io/${{ github.repository }}/agentkeys-mcp-server. github.repository preserves the repo's real casing — litentry/agentKeys (capital K) — and docker buildx rejects it:

ERROR: failed to build: invalid tag "ghcr.io/litentry/agentKeys/agentkeys-mcp-server:latest": repository name must be lowercase

The job is gated if: github.event_name == 'push' && github.ref == 'refs/heads/main', so it skips on PRs and only runs on push-to-main — which is why it passed #149's PR checks and first failed on the merge (Actions run 26719167517).

Fix

A Resolve lowercase image name step lowercases $GITHUB_REPOSITORY via tr '[:upper:]' '[:lower:]' (portable to bash 3.2 per CLAUDE.md — not the bash-4 ${,,}) → ghcr.io/litentry/agentkeys/agentkeys-mcp-server, fed to both the :latest and :<sha> tags.

Validated locally: the workflow YAML parses, and the tr step output is ghcr.io/litentry/agentkeys/agentkeys-mcp-server (all lowercase). The job only runs on merge to main, so it is exercised when this lands.

🤖 Generated with Claude Code

… lowercase)

The image job tagged ghcr.io/${{ github.repository }}/agentkeys-mcp-server, but github.repository keeps the repo's real casing (litentry/agentKeys — capital K), so docker buildx rejected it: 'invalid tag ... repository name must be lowercase'. The job runs only on push to main (skips on PRs), so it first failed on the #149 merge (Actions run 26719167517).

Fix: a 'Resolve lowercase image name' step lowercases $GITHUB_REPOSITORY via tr (portable to bash 3.2 per CLAUDE.md, not the bash-4 ${,,}) → ghcr.io/litentry/agentkeys/agentkeys-mcp-server, fed to both :latest and :$sha tags. YAML validated; tr output verified locally.
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.

1 participant