redhat-actions / buildah-build

GitHub Action to use 'buildah' to build a container image.
https://github.com/marketplace/actions/buildah-build
MIT License
142 stars 35 forks source link

[BUG] Normalize Tag Name with Lowercasing #130

Open bduverger opened 10 months ago

bduverger commented 10 months ago

Version

redhat-actions/push-to-registry@v2

Describe the bug

The bug was introduce in redhat-actions/push-to-registry@v2.10 with this PR #94 . The problem is this GitHub action lowercase the image tag but it's not in Docker standard. It's really nice to lowercase the image name but I got issue whtn I try later to download the tag with uppercase, because it was push with lowercase. And it https://docs.docker.com/engine/reference/commandline/tag/#extended-description

Steps to reproduce, workflow links, screenshots

With Docker CLI, if I try to push an image with a name which contains upercase, I got this message: invalid reference format: repository name must be lowercase But I can push an image with a tag which contains uppercases, in Docker Hub or Quay.io:

image image

So I think the PR #94 , related to this issue, is too restrive and this GitHub action shouldn't tranform the tag to be lowercase, just the image name if needed. image

bayou-brogrammer commented 7 months ago

in the meantime, you can use this workaround

# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
      # https://github.com/macbre/push-to-ghcr/issues/12
      - name: Lowercase Registry
        id: registry_case
        uses: ASzc/change-string-case-action@v6
        with:
          string: ${{ env.IMAGE_REGISTRY }}