Invalid tag/reference format with ghcr.io
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the shown workflow with cloudposse/[email protected] and compare its inputs with the generated buildx command. Trace how the registry, organization, and repository values become the image tags; done means the workflow produces valid ghcr.io tags without an empty path.
Written by the indexing model from the issue text.
Description
Found a bug? Maybe our Slack Community can help.
Describe the Bug
Hello,
I'm trying to set up a Github Workflow that uses this action to create and publish a docker image to ghcr.io.
I'm getting an error on the Builder info step
Error: buildx failed with: ERROR: invalid tag "ghcr.io//:sha-8cc8e90c5ebb6ff27df767484b7f95f9d70f3faa": invalid reference format
Expected Behavior
I expect the default tags to work.
Steps to Reproduce
Whenever a workflow action runs, see below.
Screenshots
See below
Environment (please complete the following information):
My (simplified) workflow config
name: Release
on:
push:
branches:
- main
release:
type: [published]
permissions:
contents: read
packages: write
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push
uses: cloudposse/[email protected]
with:
registry: ghcr.io
login: ${{ github.actor }}
password: ${{ secrets.github_token }}
organization: ${{ github.repository.owner.login }}
repository: ${{ github.repository.name }}
Additional Context
Error output
/usr/bin/docker buildx build --cache-from type=gha --cache-to type=gha,mode=max --file .//Dockerfile --iidfile /home/runner/work/_temp/docker-actions-toolkit-SPmw6I/build-iidfile-1c3c362c17.txt --label org.opencontainers.image.created=2025-01-14T13:35:44.838Z --label org.opencontainers.image.description=Project description --label org.opencontainers.image.licenses= --label org.opencontainers.image.revision=8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --label org.opencontainers.image.source=https://github.com// --label org.opencontainers.image.title=my-project --label org.opencontainers.image.url=https://github.com/my-org/my-project --label org.opencontainers.image.version=sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --platform linux/amd64 --attest type=provenance,mode=min,inline-only=true,builder-id=https://github.com/my-org/my-project/actions/runs/12768807147 --tag ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --tag ghcr.io//:main --tag ghcr.io//:latest --tag ghcr.io//:sha-8baa8e2 --metadata-file /home/runner/work/_temp/docker-actions-toolkit-SPmw6I/build-metadata-e623a3464d.json --pull --push ./
ERROR: invalid tag "ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099": invalid reference format
Error: buildx failed with: ERROR: invalid tag "ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099": invalid reference format
- Dominant language
- Dockerfile
- Stars
- 14
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from cloudposse/github-action-docker-build-push
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
cloudposse/github-action-docker-build-push#57 · 3 reactions ·
-
Dependency DashboardOpen
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
All issues in cloudposse/github-action-docker-build-push
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
buildkite/elastic-ci-stack-for-aws#2050 ·
Maintainers usually reply within 1 day
-
Area: Java bug report needs triage OS: Windows
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
actions/runner-images#15458 ·
Maintainers usually reply within 3 days
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
application-issue
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Installomator/Installomator#3715 ·
Maintainers usually reply within 3 days