mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-05-12 14:59:54 +02:00
Make input username and password optional
If user has authenticated to container image registry before running this action, then it's not required to provide username and password in this action Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
002092527f
commit
2c3fb7261b
7 changed files with 49 additions and 84 deletions
12
.github/workflows/verify-push.yaml
vendored
12
.github/workflows/verify-push.yaml
vendored
|
@ -86,6 +86,16 @@ jobs:
|
|||
spring-petclinic-*.jar
|
||||
port: 8080
|
||||
oci: 'true'
|
||||
env:
|
||||
STORAGE_OPTS: "overlay.mount_program=/usr/bin/fuse-overlayfs"
|
||||
|
||||
# Authenticate to container image registry to push the image
|
||||
- name: Podman Login
|
||||
uses: redhat-actions/podman-login@v1
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
# Push the image to Quay.io (Image Registry)
|
||||
- name: Push To Quay
|
||||
|
@ -95,8 +105,6 @@ jobs:
|
|||
image: ${{ steps.build_image.outputs.image }}
|
||||
tags: ${{ steps.build_image.outputs.tags }}
|
||||
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
extra-args: |
|
||||
--disable-content-trust
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue