diff --git a/.gitea/actions/docker-build/action.yml b/.gitea/actions/docker-build/action.yml index 9c8603e..5f2a897 100644 --- a/.gitea/actions/docker-build/action.yml +++ b/.gitea/actions/docker-build/action.yml @@ -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