mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-04-29 18:19:53 +02:00
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:
parent
b038efb70a
commit
23eb62f550
9 changed files with 2062 additions and 72 deletions
16
.github/workflows/verify-push.yaml
vendored
16
.github/workflows/verify-push.yaml
vendored
|
@ -1,10 +1,10 @@
|
|||
# This workflow will perform a test whenever there
|
||||
# is some change in code done to ensure that the changes
|
||||
# are not buggy and we are getting the desired output.
|
||||
name: Test Push
|
||||
on: [ push, pull_request, workflow_dispatch ]
|
||||
name: Test Push without image
|
||||
on: [ push, workflow_dispatch ]
|
||||
env:
|
||||
IMAGE_NAME: hello-world
|
||||
IMAGE_NAME: myimage
|
||||
IMAGE_REGISTRY: quay.io
|
||||
IMAGE_TAG: latest
|
||||
|
||||
|
@ -17,9 +17,12 @@ jobs:
|
|||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Pull hello-world image to push in next step
|
||||
- name: Pull Hello world image
|
||||
run: docker pull ${{ env.IMAGE_NAME }}
|
||||
- name: Build Image using Docker
|
||||
run: |
|
||||
docker build -t ${{ env.IMAGE_NAME }}:latest -<<EOF
|
||||
FROM busybox
|
||||
RUN echo "hello world"
|
||||
EOF
|
||||
|
||||
# Push the image to image registry
|
||||
- name: Push To Quay
|
||||
|
@ -32,7 +35,6 @@ jobs:
|
|||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "registry-path ${{ steps.push.outputs.registry-path }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue