Add chownFilesTo (#187)

* add chownFilesTo

* added missing newline

* added more chownFilesTo
This commit is contained in:
Skjalg S. Mæhre
2022-06-24 06:59:01 -04:00
committed by GitHub
parent e8774f3837
commit 3d5d2f5834
7 changed files with 37 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ async function run() {
gitPrivateToken,
githubToken,
checkName,
chownFilesTo,
} = Input.getFromUser();
const baseImage = new ImageTag({ editorVersion, customImage });
const runnerTemporaryPath = process.env.RUNNER_TEMP;
@@ -38,6 +39,7 @@ async function run() {
gitPrivateToken,
githubToken,
runnerTemporaryPath,
chownFilesTo,
});
} finally {
await Output.setArtifactsPath(artifactsPath);

View File

@@ -33,6 +33,7 @@ const Docker = {
gitPrivateToken,
githubToken,
runnerTemporaryPath,
chownFilesTo,
} = parameters;
const githubHome = path.join(runnerTemporaryPath, '_github_home');
@@ -74,6 +75,7 @@ const Docker = {
--env RUNNER_TEMP \
--env RUNNER_WORKSPACE \
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
--env CHOWN_FILES_TO="${chownFilesTo}" \
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
--volume "${githubHome}:/root:z" \
--volume "${githubWorkflow}:/github/workflow:z" \
@@ -105,6 +107,7 @@ const Docker = {
gitPrivateToken,
githubToken,
runnerTemporaryPath,
chownFilesTo,
} = parameters;
const githubHome = path.join(runnerTemporaryPath, '_github_home');
@@ -146,6 +149,7 @@ const Docker = {
--env RUNNER_TEMP \
--env RUNNER_WORKSPACE \
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
--env CHOWN_FILES_TO="${chownFilesTo}" \
${sshAgent ? '--env SSH_AUTH_SOCK=c:/ssh-agent' : ''} \
--volume "${githubHome}":"c:/root" \
--volume "${githubWorkflow}":"c:/github/workflow" \

View File

@@ -26,6 +26,7 @@ const Input = {
const gitPrivateToken = getInput('gitPrivateToken') || '';
const githubToken = getInput('githubToken') || '';
const checkName = getInput('checkName') || 'Test Results';
const chownFilesTo = getInput('chownFilesTo') || '';
// Validate input
if (!this.testModes.includes(testMode)) {
@@ -65,6 +66,7 @@ const Input = {
gitPrivateToken,
githubToken,
checkName,
chownFilesTo,
};
},
};