Added cloudRunnerRepoName to allow changing of CloudRunner launch unity builder repo

This commit is contained in:
brian-golfplusvr 2025-02-07 11:41:08 -06:00
parent 05bb9931cc
commit dc4de42931
6 changed files with 13 additions and 2 deletions

View File

@ -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'

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -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,

View File

@ -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 {

View File

@ -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 (