Skip to content

Commit

Permalink
Checkout to TAG if present (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic authored Feb 11, 2025
1 parent 520e235 commit f373d1e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions entrypoints/setup_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ REPO="${GITHUB_REPO%%#*}"
git remote add origin "${REPO}"
git fetch
DEFAULT_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
git reset --hard origin/"${DEFAULT_BRANCH}"
if [ -n "${TAG}" ]
then
git checkout "${TAG}"
fi
git reset --hard origin/"${TAG:-$DEFAULT_BRANCH}"

0 comments on commit f373d1e

Please sign in to comment.