Skip to content

Commit a0c07f4

Browse files
author
liukj
committed
docs: fix ci gather branches and tags
1 parent b4ee89c commit a0c07f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/build-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
5353
# Gather branches and tags, filter for semantic versions, sort, remove duplicates
5454
VERSIONS=$(git for-each-ref refs/remotes/origin refs/tags --format="%(refname:short)" | \
55-
grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$" | sort -Vr | uniq | tr '\n' ',' | sed 's/,$//')
55+
grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | awk -F'[v]' '{print "v"$2}' | sort -Vr | uniq | tr '\n' ',' | sed 's/,$//')
5656
echo "VERSIONS=main,$VERSIONS" >> $GITHUB_ENV
5757
5858
- name: Install Hugo

0 commit comments

Comments
 (0)