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"
|
TAGS="$TAGS,$TAG"
|
||||||
|
|
||||||
# Add git tag if this is a tag push
|
# Add git tag if this is a tag push
|
||||||
if [ "${{ github.ref_type }}" = "tag" ] || [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||||
TAG_NAME="${1#refs/tags/}"
|
TAG_NAME="${{ github.ref_name }}"
|
||||||
TAGS="$TAGS,$TAG_NAME"
|
TAGS="$TAGS,$TAG_NAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ inputs.registry }}" ] && [ -n "${{ inputs.registry-password }}" ]; then
|
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
|
fi
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
|
|||||||
Reference in New Issue
Block a user