Skip to content

Commit

Permalink
Push image to local registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0sh1dk committed Dec 17, 2023
1 parent 948d462 commit 06bf9af
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,25 @@ jobs:
run: |
task local-registry-up
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: localhost:${{ env.REGISTRY_PORT }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}

- name: Push image to local registry
run: |
docker pull nginx:latest
docker tag nginx:latest localhost:${{ env.REGISTRY_PORT }}/nginx:latest
docker push localhost:${{ env.REGISTRY_PORT }}/nginx:latest
- name: GHA Docker Image Exists
id: gha-docker-image-exists
continue-on-error: true
uses: Y0sh1dk/gha-docker-image-exists@main
with:
image: nginx:latest
image: localhost:${{ env.REGISTRY_PORT }}/nginx:latest
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
serverAddress: localhost:${{ env.REGISTRY_PORT }}
Expand All @@ -83,12 +96,19 @@ jobs:
run: |
task local-registry-up
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: localhost:${{ env.REGISTRY_PORT }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}

- name: GHA Docker Image Exists
id: gha-docker-image-exists
continue-on-error: true
uses: Y0sh1dk/gha-docker-image-exists@main
with:
image: nginx:invalid-tag
image: localhost:${{ env.REGISTRY_PORT }}/nginx:invalid-tag
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
serverAddress: localhost:${{ env.REGISTRY_PORT }}
Expand Down

0 comments on commit 06bf9af

Please sign in to comment.