Skip to content

Commit

Permalink
fix: check out correct branch on pull_request events
Browse files Browse the repository at this point in the history
  • Loading branch information
georeith committed Sep 5, 2024
1 parent 6ed209d commit cd15dc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ push_to_branch() {
git config --global user.email "${INPUT_GITHUB_USER_EMAIL}"
git config --global user.name "${INPUT_GITHUB_USER_NAME}"

if [ "$INPUT_SKIP_REF_CHECKOUT" != true ] && [ ${GITHUB_REF#refs/heads/} != $GITHUB_REF ]; then
git checkout "${GITHUB_REF#refs/heads/}"
if [ "$INPUT_SKIP_REF_CHECKOUT" != true ]; then
git checkout "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
fi

if [ -n "$(git show-ref refs/heads/${BRANCH})" ]; then
Expand Down

0 comments on commit cd15dc0

Please sign in to comment.