Skip to content

Commit

Permalink
Merge pull request #72 from netomi/support-pinned-version
Browse files Browse the repository at this point in the history
Support retrieving latest version tag also when pinning action
  • Loading branch information
rossjrw committed Dec 19, 2023
2 parents 7df1ee4 + 949f30e commit 4668d7c
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 describe --tags --match "v*.*.*" "$git_ref" || git describe --tags "$git_ref" || git rev-parse HEAD)

echo "$action_version"
exit 0

0 comments on commit 4668d7c

Please sign in to comment.