mirror of
https://github.com/actions/runner-container-hooks.git
synced 2026-01-06 17:57:18 +08:00
Compare commits
3 Commits
bed5615e7b
...
55d6468aad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55d6468aad | ||
|
|
8ffe11eaac | ||
|
|
170b03ac01 |
@@ -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')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 => {
|
||||||
|
|||||||
Reference in New Issue
Block a user