merge main and fix no-abbreviation eslint error

This commit is contained in:
Aaron Trudeau
2022-03-25 14:00:00 -04:00
5 changed files with 43 additions and 23 deletions

View File

@@ -22,6 +22,7 @@ async function run() {
packageName,
} = Input.getFromUser();
const baseImage = new ImageTag({ version: unityVersion, customImage });
const runnerTemporaryPath = process.env.RUNNER_TEMP;
try {
// Build docker image
@@ -41,6 +42,7 @@ async function run() {
packageName,
gitPrivateToken,
githubToken,
runnerTemporaryPath,
});
} finally {
// Set output

View File

@@ -1,13 +1,15 @@
import { existsSync, mkdirSync } from 'fs';
import ImageTag from './image-tag';
import { exec } from '@actions/exec';
import path from 'path';
const Docker = {
async build(buildParameters, silent = false) {
const { path, dockerfile, baseImage } = buildParameters;
const { path: buildPath, dockerfile, baseImage } = buildParameters;
const { version } = baseImage;
const tag = new ImageTag({ version });
const command = `docker build ${path} \
const command = `docker build ${buildPath} \
--file ${dockerfile} \
--build-arg IMAGE=${baseImage} \
--tag ${tag}`;
@@ -31,8 +33,14 @@ const Docker = {
packageName,
gitPrivateToken,
githubToken,
runnerTemporaryPath,
} = parameters;
const githubHome = path.join(runnerTemporaryPath, '_github_home');
if (!existsSync(githubHome)) mkdirSync(githubHome);
const githubWorkflow = path.join(runnerTemporaryPath, '_github_workflow');
if (!existsSync(githubWorkflow)) mkdirSync(githubWorkflow);
const command = `docker run \
--workdir /github/workspace \
--rm \
@@ -66,9 +74,9 @@ const Docker = {
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
--volume "/home/runner/work/_temp/_github_home":"/root" \
--volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" \
--volume "${workspace}":"/github/workspace" \
--volume "${githubHome}":"/root:z" \
--volume "${githubWorkflow}":"/github/workflow:z" \
--volume "${workspace}":"/github/workspace:z" \
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
${useHostNetwork ? '--net=host' : ''} \