cli default parameter

pull/310/head
Frostebite 2021-12-29 20:14:15 +00:00
parent 9536ea889a
commit 89a6004493
3 changed files with 15 additions and 15 deletions

26
dist/index.js vendored
View File

@ -3150,9 +3150,9 @@ class Docker {
const { path, dockerfile, baseImage } = buildParameters;
const { version, platform } = baseImage;
const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform });
const command = `docker build ${path} \
--file ${dockerfile} \
--build-arg IMAGE=${baseImage} \
const command = `docker build ${path} \
--file ${dockerfile} \
--build-arg IMAGE=${baseImage} \
--tag ${tag}`;
yield exec_1.exec(command, undefined, { silent });
return tag;
@ -3161,16 +3161,16 @@ class Docker {
static run(image, parameters, silent = false) {
return __awaiter(this, void 0, void 0, function* () {
const { workspace, runnerTempPath, sshAgent } = parameters;
const command = `docker run \
--workdir /github/workspace \
--rm \
${image_environment_factory_1.default.getEnvVarString(parameters)}
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "${runnerTempPath}/_github_home":"/root" \
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
--volume "${workspace}":"/github/workspace" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
const command = `docker run \
--workdir /github/workspace \
--rm \
${image_environment_factory_1.default.getEnvVarString(parameters)} \
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "${runnerTempPath}/_github_home":"/root" \
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
--volume "${workspace}":"/github/workspace" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
${image}`;
yield exec_1.exec(command, undefined, { silent });
});

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ class Docker {
const command = `docker run \
--workdir /github/workspace \
--rm \
${ImageEnvironmentFactory.getEnvVarString(parameters)}
${ImageEnvironmentFactory.getEnvVarString(parameters)} \
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "${runnerTempPath}/_github_home":"/root" \
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \