docker / docker/metadata-action
refs with uppercase characters trigger an error in buildx (branch names with uppercase characters)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 160
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 12
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
I have a mixed case user name. This means that a branch might be called WarpedPixel/issue200, which generates a ref WarpedPixel-issue200. This triggers an error in buildx:
ERROR: invalid tag "WarpedPixel-issue455": repository name must be lowercase
Expected behaviour
metadata action should generate sanitized, valid tags only. In this situation it should convert the branch name/ref to lower case.
Actual behaviour
Throws an error. I can't really use branch names with mixed case (which are created automatically by other tools like vscode). For such branches, I don't know what the workaround that would allow me to use the metadata action in a GitHub Actions build.
Repository URL
No response
Workflow run URL
No response
YAML workflow
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}},enable={{is_default_branch}}
type=sha
type=sha,format=long
- name: Build Frontend
id: build_frontend
uses: docker/build-push-action@v5.3.0
with:
context: ./frontend
build-args: VERSION=${{ needs.versioning.outputs.version }}
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
target: production
outputs: type=image
tags: |
${{ needs.versioning.outputs.tags }}
frontend:production
labels: ${{ needs.versioning.outputs.labels }}
Workflow logs
No response
BuildKit logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ref tag generation for type=ref,event=branch and reproduce it with a mixed-case branch such as WarpedPixel/issue200. Verify that the generated Docker tag is lowercase and valid for the shown GitHub Actions workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100