mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:20:07 +08:00
Add chownFilesTo (#187)
* add chownFilesTo * added missing newline * added more chownFilesTo
This commit is contained in:
11
dist/index.js
generated
vendored
11
dist/index.js
generated
vendored
@@ -42,7 +42,7 @@ function run() {
|
||||
try {
|
||||
model_1.Action.checkCompatibility();
|
||||
const { workspace, actionFolder } = model_1.Action;
|
||||
const { editorVersion, customImage, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, checkName, } = model_1.Input.getFromUser();
|
||||
const { editorVersion, customImage, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, checkName, chownFilesTo, } = model_1.Input.getFromUser();
|
||||
const baseImage = new model_1.ImageTag({ editorVersion, customImage });
|
||||
const runnerTemporaryPath = process.env.RUNNER_TEMP;
|
||||
try {
|
||||
@@ -60,6 +60,7 @@ function run() {
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
runnerTemporaryPath,
|
||||
chownFilesTo,
|
||||
});
|
||||
}
|
||||
finally {
|
||||
@@ -169,7 +170,7 @@ const Docker = {
|
||||
});
|
||||
},
|
||||
getLinuxCommand(image, parameters) {
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, runnerTemporaryPath, } = parameters;
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, } = parameters;
|
||||
const githubHome = path_1.default.join(runnerTemporaryPath, '_github_home');
|
||||
if (!(0, fs_1.existsSync)(githubHome))
|
||||
(0, fs_1.mkdirSync)(githubHome);
|
||||
@@ -208,6 +209,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" \
|
||||
@@ -222,7 +224,7 @@ const Docker = {
|
||||
/bin/bash -c /entrypoint.sh`;
|
||||
},
|
||||
getWindowsCommand(image, parameters) {
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, runnerTemporaryPath, } = parameters;
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, } = parameters;
|
||||
const githubHome = path_1.default.join(runnerTemporaryPath, '_github_home');
|
||||
if (!(0, fs_1.existsSync)(githubHome))
|
||||
(0, fs_1.mkdirSync)(githubHome);
|
||||
@@ -261,6 +263,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" \
|
||||
@@ -477,6 +480,7 @@ const Input = {
|
||||
const gitPrivateToken = (0, core_1.getInput)('gitPrivateToken') || '';
|
||||
const githubToken = (0, core_1.getInput)('githubToken') || '';
|
||||
const checkName = (0, core_1.getInput)('checkName') || 'Test Results';
|
||||
const chownFilesTo = (0, core_1.getInput)('chownFilesTo') || '';
|
||||
// Validate input
|
||||
if (!this.testModes.includes(testMode)) {
|
||||
throw new Error(`Invalid testMode ${testMode}`);
|
||||
@@ -509,6 +513,7 @@ const Input = {
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
checkName,
|
||||
chownFilesTo,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user