Copy cloud runner cache into github workspace directory

pull/461/head
Frostebite 2022-09-28 01:03:15 +01:00
parent 747f85d217
commit 48149e70a9
4 changed files with 11 additions and 6 deletions

7
dist/index.js vendored
View File

@ -3635,7 +3635,11 @@ class LocalDockerCloudRunner {
const entrypointFilePath = `start.sh`; const entrypointFilePath = `start.sh`;
fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, `#!/bin/bash fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, `#!/bin/bash
set -e set -e
${commands}`, { mkdir -p /github/workspace/cloud-runner-cache
mkdir -p /data/cache
cp /github/workspace/cloud-runner-cache/* /data/cache
${commands}
cp /data/cache/* /github/workspace/cloud-runner-cache`, {
flag: 'w', flag: 'w',
}); });
yield docker_1.default.run(image, Object.assign({ workspace, actionFolder }, this.buildParameters), false, `"chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}"`, content, { yield docker_1.default.run(image, Object.assign({ workspace, actionFolder }, this.buildParameters), false, `"chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}"`, content, {
@ -4770,7 +4774,6 @@ class TaskParameterSerializer {
.filter((x) => !this.blocked.has(x) && x.startsWith('GAMECI_')) .filter((x) => !this.blocked.has(x) && x.startsWith('GAMECI_'))
.map((x) => TaskParameterSerializer.UndoEnvVarFormat(x))), .map((x) => TaskParameterSerializer.UndoEnvVarFormat(x))),
]; ];
core.info(JSON.stringify(keys, undefined, 4));
for (const element of keys) { for (const element of keys) {
if (element !== `customJob`) { if (element !== `customJob`) {
buildParameters[element] = process.env[`GAMECI_${TaskParameterSerializer.ToEnvVarFormat(element)}`]; buildParameters[element] = process.env[`GAMECI_${TaskParameterSerializer.ToEnvVarFormat(element)}`];

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -91,7 +91,11 @@ class LocalDockerCloudRunner implements ProviderInterface {
`${workspace}/${entrypointFilePath}`, `${workspace}/${entrypointFilePath}`,
`#!/bin/bash `#!/bin/bash
set -e set -e
${commands}`, mkdir -p /github/workspace/cloud-runner-cache
mkdir -p /data/cache
cp /github/workspace/cloud-runner-cache/* /data/cache
${commands}
cp /data/cache/* /github/workspace/cloud-runner-cache`,
{ {
flag: 'w', flag: 'w',
}, },

View File

@ -90,8 +90,6 @@ export class TaskParameterSerializer {
), ),
]; ];
core.info(JSON.stringify(keys, undefined, 4));
for (const element of keys) { for (const element of keys) {
if (element !== `customJob`) { if (element !== `customJob`) {
buildParameters[element] = process.env[`GAMECI_${TaskParameterSerializer.ToEnvVarFormat(element)}`]; buildParameters[element] = process.env[`GAMECI_${TaskParameterSerializer.ToEnvVarFormat(element)}`];