Update packages/k8s/src/hooks/run-script-step.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2025-12-08 12:15:36 +01:00
committed by GitHub
parent cdec7f075f
commit fe1fa3ed2d

View File

@@ -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