mirror of
https://github.com/actions/runner-container-hooks.git
synced 2026-01-04 16:28:10 +08:00
Compare commits
3 Commits
bed5615e7b
...
55d6468aad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55d6468aad | ||
|
|
8ffe11eaac | ||
|
|
170b03ac01 |
@@ -96,7 +96,11 @@ export async function runScriptStep(
|
||||
core.debug(
|
||||
`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) {
|
||||
core.warning('Failed to copy _temp from pod')
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('Prepare job', () => {
|
||||
process.env.GITHUB_WORKSPACE as string,
|
||||
'myvolume'
|
||||
)
|
||||
fs.mkdirSync(userVolumeMount)
|
||||
fs.mkdirSync(userVolumeMount, { recursive: true })
|
||||
fs.writeFileSync(path.join(userVolumeMount, 'file.txt'), 'hello')
|
||||
prepareJobData.args.container.userMountVolumes = [
|
||||
{
|
||||
@@ -63,11 +63,7 @@ describe('Prepare job', () => {
|
||||
)
|
||||
|
||||
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,
|
||||
JOB_CONTAINER_NAME
|
||||
).then(output => {
|
||||
|
||||
Reference in New Issue
Block a user