Solve issue when image is present in Podman and Docker both (#16)

* Solve issue when image is present in Podman and Docker both

If updated docker image is present in docker env then
docker image won't get used if image same name and tag
is already present in podman env.
To fix this, selected latest built image and removed the
image at the end from the podman env if image is pulled
from docker env.

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
Divyanshu Agrawal 2021-01-19 20:54:49 +05:30 committed by GitHub
parent b038efb70a
commit 23eb62f550
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2062 additions and 72 deletions

View file

@ -120,6 +120,16 @@ jobs:
run: echo "New image has been pushed to ${{ steps.push-to-quay.outputs.registry-path }}"
```
## Note about images built with Docker
This action uses `Podman` to push, but can also push images built with `Docker`. However, Docker and Podman store their images in different locations, and Podman can only push images in its own storage.
If the image to push is present in the Docker image storage but not in the Podman image storage, it will be pulled into Podman's storage.
If the image to push is present in both the Docker and Podman image storage, the action will push the image which was more recently built, and log a warning.
If the action pulled an image from the Docker image storage into the Podman storage, it will be cleaned up from the Podman storage before the action exits.
## Troubleshooting
Note that quay.io repositories are private by default.<br>