Copy cloud runner cache into github workspace directory

pull/461/head
Frostebite 2022-09-28 01:48:09 +01:00
parent ee940bd073
commit 9921b65ebc
3 changed files with 13 additions and 3 deletions

7
dist/index.js vendored
View File

@ -3635,11 +3635,16 @@ class LocalDockerCloudRunner {
const entrypointFilePath = `start.sh`;
fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, `#!/bin/bash
set -e
apt-get update > /dev/null && apt-get install -y tree> /dev/null
mkdir -p /github/workspace/cloud-runner-cache
mkdir -p /data/cache
cp -r /github/workspace/cloud-runner-cache /data/cache
tree -L 2 /data/cache
${commands}
cp -r /data/cache /github/workspace/cloud-runner-cache`, {
cp -r /data/cache /github/workspace/cloud-runner-cache
tree -L 2 /github/workspace/cloud-runner-cache
`, {
flag: 'w',
});
yield docker_1.default.run(image, Object.assign({ workspace, actionFolder }, this.buildParameters), false, `"chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}"`, content, {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -91,11 +91,16 @@ class LocalDockerCloudRunner implements ProviderInterface {
`${workspace}/${entrypointFilePath}`,
`#!/bin/bash
set -e
apt-get update > /dev/null && apt-get install -y tree> /dev/null
mkdir -p /github/workspace/cloud-runner-cache
mkdir -p /data/cache
cp -r /github/workspace/cloud-runner-cache /data/cache
tree -L 2 /data/cache
${commands}
cp -r /data/cache /github/workspace/cloud-runner-cache`,
cp -r /data/cache /github/workspace/cloud-runner-cache
tree -L 2 /github/workspace/cloud-runner-cache
`,
{
flag: 'w',
},