mirror of
https://github.com/actions/runner-container-hooks.git
synced 2026-01-21 18:43:52 +08:00
Update packages/k8s/src/hooks/run-script-step.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,21 +27,15 @@ export async function runScriptStep(
|
|||||||
const containerTemp = '/__w/_temp'
|
const containerTemp = '/__w/_temp'
|
||||||
const containerTempSrc = '/__w/_temp_pre'
|
const containerTempSrc = '/__w/_temp_pre'
|
||||||
// Ensure base and staging dirs exist before copying
|
// Ensure base and staging dirs exist before copying
|
||||||
try {
|
await execPodStep(
|
||||||
await execPodStep(
|
[
|
||||||
[
|
'sh',
|
||||||
'sh',
|
'-c',
|
||||||
'-c',
|
'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre'
|
||||||
'mkdir -p /__w && mkdir -p /__w/_temp && mkdir -p /__w/_temp_pre'
|
],
|
||||||
],
|
state.jobPod,
|
||||||
state.jobPod,
|
JOB_CONTAINER_NAME
|
||||||
JOB_CONTAINER_NAME
|
)
|
||||||
)
|
|
||||||
} catch (err) {
|
|
||||||
core.debug(
|
|
||||||
`Failed to create temp dirs in container: ${JSON.stringify(err)}`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
await execCpToPod(state.jobPod, runnerTemp, containerTempSrc)
|
await execCpToPod(state.jobPod, runnerTemp, containerTempSrc)
|
||||||
|
|
||||||
// Copy GitHub directories from temp to /github
|
// Copy GitHub directories from temp to /github
|
||||||
|
|||||||
Reference in New Issue
Block a user