Fix: make registry login conditional inside step instead of using if: on step
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user