mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
Attempt to work around strage git behaviour in github
This commit is contained in:
parent
3371a50d5a
commit
e63b0f3c53
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
|
@ -499,13 +499,23 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# There is something strange with the github runners
|
||||
# normally, `git for-each-ref refs/tags` will show annotated tags
|
||||
# with a type of "tag" and lightweight with type "commit".
|
||||
# But not in the github runner environment...
|
||||
# So, instead of:
|
||||
# TAGTYPE=$(git cat-file -t $GITHUB_REF)
|
||||
# We build a workaround
|
||||
- name: Get Tag Type
|
||||
run: |
|
||||
TAGTYPE=$(git cat-file -t $GITHUB_REF)
|
||||
git cat-file tag $GITHUB_REF
|
||||
if $? -eq 0; then TAGTYPE=tag; else TAGTYPE=commit; fi
|
||||
echo "::set-output name=TAGTYPE::$TAGTYPE"
|
||||
|
||||
echo ================Debug
|
||||
echo REF=$GITHUB_REF
|
||||
echo TAGTYPE=$TAGTYPE
|
||||
echo ================
|
||||
echo git for-each-ref refs/tags
|
||||
git for-each-ref refs/tags
|
||||
echo ================
|
||||
|
|
Loading…
Reference in New Issue
Block a user