pull/437/head
Frostebite 2022-10-13 21:54:37 +01:00
parent 441f37d174
commit 37bc098549
4 changed files with 17 additions and 7 deletions

9
dist/index.js vendored
View File

@ -3823,7 +3823,7 @@ tree -L 3 ${sharedFolder}
myOutput += `[LOCAL-DOCKER-ERROR]${data.toString()}`;
},
},
});
}, true);
return myOutput;
});
}
@ -5683,12 +5683,12 @@ const image_environment_factory_1 = __importDefault(__nccwpck_require__(25145));
const fs_1 = __nccwpck_require__(57147);
const path_1 = __importDefault(__nccwpck_require__(71017));
class Docker {
static run(image, parameters, silent = false, overrideCommands = '', additionalVariables = [], options = false) {
static run(image, parameters, silent = false, overrideCommands = '', additionalVariables = [], options = false, entrypointBash = false) {
return __awaiter(this, void 0, void 0, function* () {
let runCommand = '';
switch (process.platform) {
case 'linux':
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables);
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables, entrypointBash);
break;
case 'win32':
runCommand = this.getWindowsCommand(image, parameters);
@ -5702,7 +5702,7 @@ class Docker {
}
});
}
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = []) {
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = [], entrypointBash = false) {
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
const githubHome = path_1.default.join(runnerTempPath, '_github_home');
if (!fs_1.existsSync(githubHome))
@ -5713,6 +5713,7 @@ class Docker {
return `docker run \
--workdir /github/workspace \
--rm \
${entrypointBash ? `--entrypoint /bin/bash` : ``}
${image_environment_factory_1.default.getEnvVarString(parameters, additionalVariables)} \
--env UNITY_SERIAL \
--env GITHUB_WORKSPACE=/github/workspace \

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -124,6 +124,7 @@ tree -L 3 ${sharedFolder}
},
},
},
true,
);
return myOutput;

View File

@ -11,11 +11,12 @@ class Docker {
overrideCommands = '',
additionalVariables: any[] = [],
options: any = false,
entrypointBash: boolean = false,
) {
let runCommand = '';
switch (process.platform) {
case 'linux':
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables);
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables, entrypointBash);
break;
case 'win32':
runCommand = this.getWindowsCommand(image, parameters);
@ -28,7 +29,13 @@ class Docker {
}
}
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables: any[] = []): string {
static getLinuxCommand(
image,
parameters,
overrideCommands = '',
additionalVariables: any[] = [],
entrypointBash: boolean = false,
): string {
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
const githubHome = path.join(runnerTempPath, '_github_home');
@ -39,6 +46,7 @@ class Docker {
return `docker run \
--workdir /github/workspace \
--rm \
${entrypointBash ? `--entrypoint /bin/bash` : ``}
${ImageEnvironmentFactory.getEnvVarString(parameters, additionalVariables)} \
--env UNITY_SERIAL \
--env GITHUB_WORKSPACE=/github/workspace \