diff --git a/action.yaml b/action.yaml index 85f53a6..883bdb6 100644 --- a/action.yaml +++ b/action.yaml @@ -72,6 +72,11 @@ inputs: required: true default: 'github.com' + target_host_domain: + description: 'Domain name to be used in target repo URL.' + required: false + default: 'github.com' + shallow_since: description: 'Length of time used when fetching shallow repo data, should match how often you perform a sync' required: true diff --git a/run/push_updates.sh b/run/push_updates.sh index 3e0f1a4..528ff57 100644 --- a/run/push_updates.sh +++ b/run/push_updates.sh @@ -7,7 +7,7 @@ push_new_commits() { # TODO: figure out how this would work in local mode... # update remote url with token since it is not persisted during checkout step when syncing from a private repo if [ -n "${INPUT_TARGET_REPO_TOKEN}" ]; then - git remote set-url origin "https://${GITHUB_ACTOR}:${INPUT_TARGET_REPO_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + git remote set-url origin "https://${GITHUB_ACTOR}:${INPUT_TARGET_REPO_TOKEN}@${INPUT_TARGET_HOST_DOMAIN}/${GITHUB_REPOSITORY}.git" fi # shellcheck disable=SC2086