Compare commits

..

3 Commits

Author SHA1 Message Date
Nikola Jokic
55d6468aad typo 2025-12-05 18:08:45 +01:00
Nikola Jokic
8ffe11eaac try doing only file commands 2025-12-05 16:57:56 +01:00
Nikola Jokic
170b03ac01 user volume mount 2025-12-05 13:26:17 +01:00
2 changed files with 7 additions and 7 deletions

View File

@@ -96,7 +96,11 @@ export async function runScriptStep(
core.debug( core.debug(
`Copying from job pod '${state.jobPod}' ${containerTemp} to ${runnerTemp}` `Copying from job pod '${state.jobPod}' ${containerTemp} to ${runnerTemp}`
) )
await execCpFromPod(state.jobPod, containerTemp, `${workdir}`) await execCpFromPod(
state.jobPod,
`${containerTemp}/_runner_file_commands`,
`${workdir}/_temp`
)
} catch (error) { } catch (error) {
core.warning('Failed to copy _temp from pod') core.warning('Failed to copy _temp from pod')
} }

View File

@@ -45,7 +45,7 @@ describe('Prepare job', () => {
process.env.GITHUB_WORKSPACE as string, process.env.GITHUB_WORKSPACE as string,
'myvolume' 'myvolume'
) )
fs.mkdirSync(userVolumeMount) fs.mkdirSync(userVolumeMount, { recursive: true })
fs.writeFileSync(path.join(userVolumeMount, 'file.txt'), 'hello') fs.writeFileSync(path.join(userVolumeMount, 'file.txt'), 'hello')
prepareJobData.args.container.userMountVolumes = [ prepareJobData.args.container.userMountVolumes = [
{ {
@@ -63,11 +63,7 @@ describe('Prepare job', () => {
) )
await execPodStep( await execPodStep(
[ ['sh', '-c', '[ "$(cat /__w/myvolume/file.txt)" = "hello" ] || exit 5'],
'sh',
'-c',
'\'[ "$(cat /__w/myvolume/file.txt)" = "hello" ] || exit 5\''
],
content!.state!.jobPod, content!.state!.jobPod,
JOB_CONTAINER_NAME JOB_CONTAINER_NAME
).then(output => { ).then(output => {