Skip to content

Commit 574d471

Browse files
fix(docs): update docs generation action to account for multiple tags (#2702)
1 parent 186a13c commit 574d471

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,19 @@ jobs:
2828
- name: Check alpha version
2929
id: alpha_check
3030
run: |
31-
VERSION=$(git describe --tags --abbrev=0)
32-
if echo "$VERSION" | grep -q "alpha"; then
33-
echo "Skipping docs generation for alpha version"
34-
echo "is_alpha=true" >> $GITHUB_OUTPUT
35-
exit 0
36-
else
31+
# Get all tags on current commit
32+
TAGS=$(git tag --points-at HEAD)
33+
echo "Tags on current commit: $TAGS"
34+
35+
# Check if any of them are non-alpha
36+
if echo "$TAGS" | grep -v alpha | grep -q .; then
37+
echo "Found non-alpha tag(s) on current commit"
3738
echo "Generating docs for non-alpha version"
3839
echo "is_alpha=false" >> $GITHUB_OUTPUT
40+
else
41+
echo "No non-alpha tags found on current commit"
42+
echo "Skipping docs generation for alpha version"
43+
echo "is_alpha=true" >> $GITHUB_OUTPUT
3944
fi
4045
shell: bash
4146

0 commit comments

Comments
 (0)