Skip to content

Commit a601794

Browse files
committed
ci: guard manual auto-release tag name
1 parent 2bcc83d commit a601794

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/auto-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ jobs:
4646
4747
- name: Extract tag name
4848
id: tag
49-
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
49+
run: |
50+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
51+
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
52+
else
53+
echo "TAG_NAME=latest" >> "$GITHUB_OUTPUT"
54+
fi
5055
5156
- name: Build PDF
5257
run: mdpress build --format pdf --output docker_practice-${{ steps.tag.outputs.TAG_NAME || 'latest' }}.pdf

0 commit comments

Comments
 (0)