Skip to content

Commit

Permalink
Support pinning of the action
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Neidhart <[email protected]>
  • Loading branch information
netomi committed Dec 18, 2023
1 parent 7df1ee4 commit 949f30e
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 949f30e

Please sign in to comment.