diff --git a/.gitea/actions/docker-build/action.yml b/.gitea/actions/docker-build/action.yml index 57fd4b4..9c8603e 100644 --- a/.gitea/actions/docker-build/action.yml +++ b/.gitea/actions/docker-build/action.yml @@ -113,9 +113,10 @@ runs: - name: Log in to Docker registry shell: bash - if: inputs.push == 'true' && inputs.registry != '' run: | - echo "${{ inputs.registry-password }}" | docker login ${{ inputs.registry }} -u ${{ inputs.registry-username }} --password-stdin + if [ -n "${{ inputs.registry }}" ] && [ -n "${{ inputs.registry-password }}" ]; then + echo "${{ inputs.registry-password }}" | docker login ${{ inputs.registry }} -u ${{ inputs.registry-username }} --password-stdin || echo "Login failed or not needed" + fi - name: Build image id: build