Skip to content

Commit

Permalink
Fix remote URL for GitHub server
Browse files Browse the repository at this point in the history
The hard coded part `github.com` in the GIT remote URL does not work on GitHub enterprise instances.  Please use instead the build in variable `GITHUB_SERVER_URL` and remove the `https://` prefix.
  • Loading branch information
TheKoenig committed Oct 11, 2021
1 parent 65194d8 commit 189e99d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
DESTINATION_BRANCH="${INPUT_DESTINATION_BRANCH:-"master"}"

# Github actions no longer auto set the username and GITHUB_TOKEN
git remote set-url origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
git remote set-url origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@${GITHUB_SERVER_URL#https://}/$GITHUB_REPOSITORY"

# Pull all branches references down locally so subsequent commands can see them
git fetch origin '+refs/heads/*:refs/heads/*' --update-head-ok
Expand Down

0 comments on commit 189e99d

Please sign in to comment.