Fix: use github.ref_name for tag extraction, remove silent login fallback, drop broken github.ref_type check
This commit is contained in:
@@ -102,8 +102,8 @@ runs:
|
||||
TAGS="$TAGS,$TAG"
|
||||
|
||||
# Add git tag if this is a tag push
|
||||
if [ "${{ github.ref_type }}" = "tag" ] || [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
TAG_NAME="${1#refs/tags/}"
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
TAG_NAME="${{ github.ref_name }}"
|
||||
TAGS="$TAGS,$TAG_NAME"
|
||||
fi
|
||||
|
||||
@@ -115,7 +115,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
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"
|
||||
echo "${{ inputs.registry-password }}" | docker login ${{ inputs.registry }} -u ${{ inputs.registry-username }} --password-stdin
|
||||
fi
|
||||
|
||||
- name: Build image
|
||||
|
||||
Reference in New Issue
Block a user