Skip to content

GitHub Action: fails to push Docker image without tag #39

Description

@sgerrand

Error message from building a git tag:

/usr/bin/docker buildx build . \
  --iidfile /home/runner/work/_temp/docker-actions-toolkit-G9AUmT/build-iidfile-d3c407ba44.txt \
  --label org.opencontainers.image.created=2024-07-01T15:47:34.411Z \
  --label org.opencontainers.image.description=Alpine Linux package builder in Docker \
  --label org.opencontainers.image.licenses= \
  --label org.opencontainers.image.revision=8da63dc3a1f5d59e2be146c110d28717700e2b4f \
  --label org.opencontainers.image.source=https://github.com/sgerrand/docker-alpine-abuild \
  --label org.opencontainers.image.title=docker-alpine-abuild \
  --label org.opencontainers.image.url=https://github.com/sgerrand/docker-alpine-abuild \
  --label org.opencontainers.image.version= \
  --platform linux/amd64,linux/arm/v7,linux/arm64 \
  --attest type=provenance,mode=max,builder-id=https://github.com/sgerrand/docker-alpine-abuild/actions/runs/9747257041/attempts/1 \
  --metadata-file /home/runner/work/_temp/docker-actions-toolkit-G9AUmT/build-metadata-9c7cb11687.json \
  --push
ERROR: tag is needed when pushing to registry

Looks like the git tag reference doesn't get passed to the build job which then causes a failure when docker buildx build attempts to push the freshly built image.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions