diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7fca895..b199c49 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 ================