Skip to content

Commit 468582c

Browse files
fix: Add support for GitHub Enterprise Server (#66)
* fix: Add support for GitHub Enterprise Server based on PR #52 by a-bertroud * fix: Remove extra line break --------- Co-authored-by: Gary <[email protected]>
1 parent 50fc9d7 commit 468582c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entrypoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ fi
8181
echo "REVISION=${REV}" >>"$GITHUB_ENV"
8282
echo "version=${REV}" >>"$GITHUB_OUTPUT"
8383

84+
GITHUB_DOMAIN=${GITHUB_SERVER_URL#*//}
8485
CURRENT_BRANCH="$(git branch --show-current)"
8586
INPUT_BRANCH="${INPUT_BRANCH:-$CURRENT_BRANCH}"
8687
INPUT_REPOSITORY="${INPUT_REPOSITORY:-$GITHUB_REPOSITORY}"
@@ -94,7 +95,7 @@ if [[ $INPUT_PUSH == 'true' ]]; then
9495
echo "You probably want to run on push to your default branch instead." >&2
9596
else
9697
echo "Pushing to branch..."
97-
REMOTE_REPO="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${INPUT_REPOSITORY}.git"
98+
REMOTE_REPO="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${GITHUB_DOMAIN}/${INPUT_REPOSITORY}.git"
9899
git pull "$REMOTE_REPO" "$INPUT_BRANCH"
99100
git push "$REMOTE_REPO" "HEAD:${INPUT_BRANCH}" --tags
100101
fi

0 commit comments

Comments
 (0)