Fix: use github.ref_name for tag extraction, remove silent login fallback, drop broken github.ref_type check

This commit is contained in:
Hermes
2026-05-02 18:05:19 -07:00
parent c092e90c3c
commit 36a5d566e1

View File

@@ -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