Skip to content

Commit

Permalink
Support retrieving latest version tag also when pinning action
Browse files Browse the repository at this point in the history
  • Loading branch information
netomi committed Dec 18, 2023
1 parent 7df1ee4 commit 10abfe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/find-current-git-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ fi
echo >&2 "Determining Git tag for $github_repository/$git_ref"

echo >&2 "Cloning repository $github_repository at ref $git_ref"
git clone --bare --single-branch --branch "$git_ref" "https://github.com/$github_repository" bare_pr_preview
git clone --bare "https://github.com/$github_repository" bare_pr_preview

cd bare_pr_preview || exit 1

action_version=$(git describe --tags --match "v*.*.*" || git describe --tags || git rev-parse HEAD)
action_version=$(git tag --points-at "$git_ref" "v*.*.*")

echo "$action_version"
exit 0

0 comments on commit 10abfe1

Please sign in to comment.