From e33cfa574212e8722034156757f8383979e76cb9 Mon Sep 17 00:00:00 2001 From: Peter Murray <681306+peter-murray@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:34:52 +0100 Subject: Inject GitHub host to be able to clone from another GitHub instance (#922) * Adding the ability to specify the GitHub Server URL and allowing for it to differ from the Actions workflow host * Adding tests for injecting the GitHub URL * Addressing code review comments for PR #922 --- src/input-helper.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/input-helper.ts') diff --git a/src/input-helper.ts b/src/input-helper.ts index 8c2f901..237b06a 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -125,5 +125,10 @@ export async function getInputs(): Promise { // Set safe.directory in git global config. result.setSafeDirectory = (core.getInput('set-safe-directory') || 'true').toUpperCase() === 'TRUE' + + // Determine the GitHub URL that the repository is being hosted from + result.githubServerUrl = core.getInput('github-server-url') + core.debug(`GitHub Host URL = ${result.githubServerUrl}`) + return result } -- cgit v1.2.3