From 189e99db6ad9902275c2da08803d71938f219586 Mon Sep 17 00:00:00 2001 From: TheKoenig <74304748+TheKoenig@users.noreply.github.com> Date: Mon, 11 Oct 2021 16:36:32 +0200 Subject: [PATCH] Fix remote URL for GitHub server 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. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index ce2dd73..e29be31 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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