Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Enforce Lower-case Repository Name for Registry Push #54

Closed
xee5ch opened this issue Nov 10, 2021 · 3 comments · Fixed by #56
Closed

[BUG] Enforce Lower-case Repository Name for Registry Push #54

xee5ch opened this issue Nov 10, 2021 · 3 comments · Fixed by #56
Assignees
Labels
enhancement New feature or request

Comments

@xee5ch
Copy link
Contributor

xee5ch commented Nov 10, 2021

Is your feature request related to a problem? Please describe.

When attempting to use this wonderful GH Action, I happened to be using a repository that is capitalized (OSCAL). Having a registry with a capitalized name breaks the builds with the errors below. It would be preferable to just lowercase the repo name.

Run redhat-actions/push-to-registry@v2
Creating temporary Podman image storage for pulling from Docker daemon
Warning: "fuse-overlayfs" is not found. Install it before running this action. For more detail see https://github.com/redhat-actions/buildah-build/issues/45
Combining image name "cli" and registry "ghcr.io/oscal-club/OSCAL" to form registry path "ghcr.io/oscal-club/OSCAL/cli"
🔍 Checking if "cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5, cli:issue-1008-publish-container-images, cli:latest" present in the local Podman image storage
/usr/bin/podman version
/usr/bin/podman image exists cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5
/usr/bin/podman image exists cli:issue-1008-publish-container-images
/usr/bin/podman image exists cli:latest
Tags "cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5, cli:issue-1008-publish-container-images, cli:latest" found in Podman image storage
🔍 Checking if "cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5, cli:issue-1008-publish-container-images, cli:latest" present in the local Docker image storage
/usr/bin/podman --root /tmp/podman-from-docker-zmfOHJ pull docker-daemon:cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5
/usr/bin/podman --root /tmp/podman-from-docker-zmfOHJ pull docker-daemon:cli:issue-1008-publish-container-images
/usr/bin/podman --root /tmp/podman-from-docker-zmfOHJ pull docker-daemon:cli:latest
Tag "cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5" was found in the Podman image storage, but not in the Docker image storage. The image(s) will be pushed from Podman image storage.
⏳ Pushing "cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5" to ghcr.io/oscal-club/OSCAL/cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5, ghcr.io/oscal-club/OSCAL/cli:issue-1008-publish-container-images, ghcr.io/oscal-club/OSCAL/cli:latest as "xee5ch"
/usr/bin/podman push --quiet --digestfile cli-77ec43e8f757473a1e51d6ae5fc89de392c0faf5_digest.txt cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5 ghcr.io/oscal-club/OSCAL/cli:77ec43e8f757473a1e51d6ae5fc89de392c0faf5 --tls-verify=true --creds=xee5ch:***
Error: invalid reference format: repository name must be lowercase
Removing temporary Podman image storage for pulling from Docker daemon
/usr/bin/podman --root /tmp/podman-from-docker-zmfOHJ rmi -a -f
Error: podman exited with code 125
Error: invalid reference format: repository name must be lowercase

Describe the solution you'd like

Apparently this is part of the registry spec, so albeit it minor, I am surprised others do not want the action to decapitalize the repo and onwer name as well.

Describe alternatives you've considered

After troubleshooting this evening, I use shell commands in GitHub Actions to lowercase the image name in the files.

``

Additional context

@xee5ch xee5ch added the enhancement New feature or request label Nov 10, 2021
@tetchel
Copy link
Contributor

tetchel commented Nov 10, 2021

sure, a quick test shows the entire repository name/image name:image tag must be lowercase. TIL

@xee5ch
Copy link
Contributor Author

xee5ch commented Nov 10, 2021

I can work on this one, @tetchel, does not seem like a huge lift. :-)

@divyansh42
Copy link
Member

That's great. Feel free to work on this. 🙂

@divyansh42 divyansh42 added this to To do in Sprint 212 via automation Jan 11, 2022
@divyansh42 divyansh42 moved this from To do to In progress in Sprint 212 Jan 11, 2022
@shwetha-h-p shwetha-h-p added this to To do in Sprint 214 via automation Feb 3, 2022
@divyansh42 divyansh42 moved this from To do to In progress in Sprint 214 Feb 3, 2022
@divyansh42 divyansh42 removed this from In progress in Sprint 212 Feb 3, 2022
@divyansh42 divyansh42 removed this from In progress in Sprint 214 Mar 1, 2022
@divyansh42 divyansh42 added this to To do in Sprint 215 via automation Mar 1, 2022
@divyansh42 divyansh42 moved this from To do to In progress in Sprint 215 Mar 1, 2022
@divyansh42 divyansh42 removed this from In progress in Sprint 215 Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants