fix: fall back to git tag on HEAD when version input is not propagated
All checks were successful
Push Validation / validate (push) Successful in 1m43s
All checks were successful
Push Validation / validate (push) Successful in 1m43s
This commit is contained in:
@@ -52,6 +52,9 @@ runs:
|
|||||||
elif [[ "${GITHUB_REF_VALUE}" == refs/tags/* ]]; then
|
elif [[ "${GITHUB_REF_VALUE}" == refs/tags/* ]]; then
|
||||||
tag="${GITHUB_REF_VALUE#refs/tags/}"
|
tag="${GITHUB_REF_VALUE#refs/tags/}"
|
||||||
normalized="${tag#v}"
|
normalized="${tag#v}"
|
||||||
|
elif head_tag="$(git describe --exact-match --tags HEAD 2>/dev/null)" && [[ -n "$head_tag" ]]; then
|
||||||
|
tag="$head_tag"
|
||||||
|
normalized="${tag#v}"
|
||||||
else
|
else
|
||||||
echo "A version input is required when the workflow is not running from a tag push" >&2
|
echo "A version input is required when the workflow is not running from a tag push" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user