gha-docker-image-exists Test #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gha-docker-image-exists Test | |
on: | |
workflow_dispatch: | |
env: | |
REGISTRY_PORT: 5000 | |
REGISTRY_USERNAME: "test-registry-username" | |
REGISTRY_PASSWORD: "test-registry-password" | |
jobs: | |
success-no-auth: | |
runs-on: ubuntu-latest | |
steps: | |
- name: GHA Docker Image Exists | |
id: gha-docker-image-exists | |
continue-on-error: true | |
uses: Y0sh1dk/gha-docker-image-exists@feature/registry-basic-auth | |
with: | |
image: nginx:latest | |
- name: Check output | |
run: | | |
if [ ${{ steps.gha-docker-image-exists.outcome == 'success' }} ]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
fail-no-auth: | |
runs-on: ubuntu-latest | |
steps: | |
- name: GHA Docker Image Exists | |
id: gha-docker-image-exists | |
continue-on-error: true | |
uses: Y0sh1dk/gha-docker-image-exists@feature/registry-basic-auth | |
with: | |
image: nginx:invalid-tag | |
- name: Check output | |
run: | | |
if [ ${{ steps.gha-docker-image-exists.outcome == 'failure' }} ]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
success-auth: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
- name: Setup local registry | |
run: | | |
task local-registry-up | |
- name: GHA Docker Image Exists | |
id: gha-docker-image-exists | |
continue-on-error: true | |
uses: Y0sh1dk/gha-docker-image-exists@feature/registry-basic-auth | |
with: | |
image: nginx:latest | |
username: ${{ env.REGISTRY_USERNAME }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
serverAddress: localhost:${{ env.REGISTRY_PORT }} | |
- name: Check output | |
run: | | |
if [ ${{ steps.gha-docker-image-exists.outcome == 'success' }} ]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
fail-auth: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
- name: Setup local registry | |
run: | | |
task local-registry-up | |
- name: GHA Docker Image Exists | |
id: gha-docker-image-exists | |
continue-on-error: true | |
uses: Y0sh1dk/gha-docker-image-exists@feature/registry-basic-auth | |
with: | |
image: nginx:invalid-tag | |
username: ${{ env.REGISTRY_USERNAME }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
serverAddress: localhost:${{ env.REGISTRY_PORT }} | |
- name: Check output | |
run: | | |
if [ ${{ steps.gha-docker-image-exists.outcome == 'failure' }} ]; then | |
exit 0 | |
else | |
exit 1 | |
fi |