fix: tag name

This commit is contained in:
naiba 2024-10-24 22:44:13 +08:00
parent 0b6d0977ac
commit 33ec746a54

View File

@ -150,9 +150,10 @@ jobs:
- name: Extract branch name in tag - name: Extract branch name in tag
run: | run: |
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/}) if [[ $GITHUB_REF == refs/heads/* ]]; then
if [ -z "$TAG_NAME" ]; then export TAG_NAME=$(echo ${GITHUB_REF#refs/heads/})
export TAG_NAME=$(echo ${GITHUB_HEAD_REF}) else
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})
fi fi
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
id: extract_branch id: extract_branch