diff --git a/action.yml b/action.yml index 17c3441c..c82ad8cd 100644 --- a/action.yml +++ b/action.yml @@ -265,6 +265,10 @@ inputs: default: '50' required: false description: '[CloudRunner] Specifies the depth of the clone for the repository' + cloudRunnerRepoName: + default: 'game-ci/unity-builder' + required: false + description: '[CloudRunner] Specifies the repo for the unity builder. Useful if you forked the repo for testing, features, or fixes.' outputs: volume: description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes' diff --git a/dist/index.js b/dist/index.js index ca8a3f26..bb816cba 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 6425497a..20a83c28 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/build-parameters.ts b/src/model/build-parameters.ts index 7d72569f..ffce5e25 100644 --- a/src/model/build-parameters.ts +++ b/src/model/build-parameters.ts @@ -75,6 +75,7 @@ class BuildParameters { public runNumber!: string; public branch!: string; public githubRepo!: string; + public cloudRunnerRepoName!: string; public gitSha!: string; public logId!: string; public buildGuid!: string; @@ -195,7 +196,8 @@ class BuildParameters { branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()), cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0], cloudRunnerDebug: CloudRunnerOptions.cloudRunnerDebug, - githubRepo: (Input.githubRepo ?? (await GitRepoReader.GetRemote())) || 'game-ci/unity-builder', + githubRepo: (Input.githubRepo ?? (await GitRepoReader.GetRemote())) || CloudRunnerOptions.cloudRunnerRepoName, + cloudRunnerRepoName: CloudRunnerOptions.cloudRunnerRepoName, isCliMode: Cli.isCliMode, awsStackName: CloudRunnerOptions.awsStackName, gitSha: Input.gitSha, diff --git a/src/model/cloud-runner/options/cloud-runner-folders.ts b/src/model/cloud-runner/options/cloud-runner-folders.ts index afb8d038..ff86f17d 100644 --- a/src/model/cloud-runner/options/cloud-runner-folders.ts +++ b/src/model/cloud-runner/options/cloud-runner-folders.ts @@ -73,7 +73,7 @@ export class CloudRunnerFolders { } public static get unityBuilderRepoUrl(): string { - return `https://${CloudRunner.buildParameters.gitPrivateToken}@github.com/game-ci/unity-builder.git`; + return `https://${CloudRunner.buildParameters.gitPrivateToken}@github.com/${CloudRunner.buildParameters.unityBuilderRepo}.git`; } public static get targetBuildRepoUrl(): string { diff --git a/src/model/cloud-runner/options/cloud-runner-options.ts b/src/model/cloud-runner/options/cloud-runner-options.ts index dc09da5b..c2e7f6a5 100644 --- a/src/model/cloud-runner/options/cloud-runner-options.ts +++ b/src/model/cloud-runner/options/cloud-runner-options.ts @@ -74,6 +74,10 @@ class CloudRunnerOptions { return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || ''; } + static get cloudRunnerRepoName(): string { + return CloudRunnerOptions.getInput('cloudRunnerRepoName') || `game-ci/unity-builder`; + } + static get finalHooks(): string[] { return CloudRunnerOptions.getInput('finalHooks')?.split(',') || []; } @@ -85,6 +89,7 @@ class CloudRunnerOptions { static get githubRepo(): string | undefined { return CloudRunnerOptions.getInput('GITHUB_REPOSITORY') || CloudRunnerOptions.getInput('GITHUB_REPO') || undefined; } + static get branch(): string { if (CloudRunnerOptions.getInput(`GITHUB_REF`)) { return (