Skip to content

Commit 535fd5e

Browse files
committed
testerrrrr
1 parent b331e09 commit 535fd5e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,15 @@ jobs:
171171
- uses: actions/checkout@v2
172172
- name: Get Tags
173173
run: |
174-
git fetch --tags
175-
git describe --tags $(git rev-list --tags --max-count=1)
174+
TAG="$(git tag --points-at HEAD)"
175+
if [ ! -z "$TAG" ]; then
176+
SUFFIX="$TAG"
177+
elif [ "$EVENT_NAME" == "pull_request" ]; then
178+
PR_TITLE=$(echo "${PR_TITLE}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
179+
SUFFIX="pr[$PR_NUM]-sha[$PR_SHA]-title[$PR_TITLE"
180+
SUFFIX=$(printf "%.99s]" "$SUFFIX")
181+
else
182+
SUFFIX="sha[$(git rev-parse --short HEAD)]"
176183
- name: Setup Submodules
177184
run: git config --global --add safe.directory . && git submodule update --init --recursive
178185
- name: Setup MSBuild

0 commit comments

Comments
 (0)