fix: update CI workflow to use environment variables for Docker registry credentials
All checks were successful
CI / test (3.11) (push) Successful in 9m25s
CI / build-image (push) Successful in 2m2s

This commit is contained in:
2025-10-23 09:47:53 +02:00
parent 3a24e86c45
commit f7695be8ef

View File

@@ -94,16 +94,16 @@ jobs:
uses: docker/login-action@v3 uses: docker/login-action@v3
continue-on-error: true continue-on-error: true
with: with:
registry: ${{ secrets.REGISTRY_URL }} registry: ${{ env.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ env.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ env.REGISTRY_PASSWORD }}
- name: Build (and optionally push) image - name: Build (and optionally push) image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: Dockerfile file: Dockerfile
push: ${{ steps.meta.outputs.on_default == 'true' && steps.meta.outputs.event_name != 'pull_request' && (secrets.REGISTRY_URL != '' && secrets.REGISTRY_USERNAME != '' && secrets.REGISTRY_PASSWORD != '') }} push: ${{ steps.meta.outputs.on_default == 'true' && steps.meta.outputs.event_name != 'pull_request' && (env.REGISTRY_URL != '' && env.REGISTRY_USERNAME != '' && env.REGISTRY_PASSWORD != '') }}
tags: | tags: |
${{ secrets.REGISTRY_URL }}/allucanget/contact.allucanget.biz:latest ${{ env.REGISTRY_URL }}/allucanget/contact.allucanget.biz:latest
${{ secrets.REGISTRY_URL }}/allucanget/contact.allucanget.biz:${{ steps.meta.outputs.sha }} ${{ env.REGISTRY_URL }}/allucanget/contact.allucanget.biz:${{ steps.meta.outputs.sha }}