From 59dfeed9cab9fa98be10dfc434fc01d910913cc7 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Mon, 18 Dec 2023 19:58:23 +0100 Subject: [PATCH] Update method to retrieve tag from ref based on review --- lib/find-current-git-tag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/find-current-git-tag.sh b/lib/find-current-git-tag.sh index b95c69d..2c3b40f 100755 --- a/lib/find-current-git-tag.sh +++ b/lib/find-current-git-tag.sh @@ -28,7 +28,7 @@ git clone --bare "https://github.com/$github_repository" bare_pr_preview cd bare_pr_preview || exit 1 -action_version=$(git tag --points-at "$git_ref" "v*.*.*") +action_version=$(git describe --tags --match "v*.*.*" "$git_ref" || git describe --tags "$git_ref" || git rev-parse HEAD) echo "$action_version" exit 0