Description
Version
redhat-actions/push-to-registry@v2
(pointing to redhat-actions/[email protected]
)
Describe the bug
push-to-registry
currently does not support manually specifying the local image to push to the registry (also see #58, suggesting a local
input). It rather uses the (unqualified) image name as reference. This will cause issues when Podman's registry search path (i.e. Podman's default registries.conf
) doesn't resolve the unqualified image name to the local storage, but a registry. push-to-registry
might end up pushing the wrong image...
Steps to reproduce, workflow links, screenshots
See https://github.com/SGSGermany/debian/runs/6995305321?check_suite_focus=true#step:8:113
Here I'm building a base image for Debian-based containers. The source is docker.io/debian:bullseye
(digest sha256:ea4b2132c62e73f34156f416e5e21247b58f5cb4ab23105071ca94472f78d02d
) and the image built (digest sha256:9b831a98b2faed194c86234c8f4e9111eb38c44652530a40601b698056315453
) is tagged with debian:bullseye
(among others, e.g. debian:v11
). I'm trying to push this image with all its tags to ghcr.io/sgsgermany/debian
.
As you can see, push-to-registry
pushes docker.io/debian:bullseye
for the bullseye
tag, and not the expected localhost/debian:bullseye
(compare digests; digests of the pushed debian:bullseye
and debian:v11
don't match, even though localhost/debian:bullseye
and localhost/debian:v11
match).
push-to-registry
should always use a fully-qualified image name for the local image (i.e. /usr/bin/podman push --quiet --digestfile debian-v11.3_digest.txt localhost/debian:bullseye ghcr.io/sgsgermany/debian:bullseye --tls-verify=true
). Another solution might be to set CONTAINERS_REGISTRIES_CONF=/dev/null
for podman push
, but this needs verification.