Skip to content

Commit 5c08488

Browse files
committed
fix k8s-novolume issues
1 parent 1f11d6a commit 5c08488

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@ export async function runScriptStep(
7171
throw new Error(`failed to merge temp dirs: ${message}`)
7272
}
7373

74+
// Copy GitHub directories from temp to /github (PR 287 fix: event.json not copied to /github/workflow)
75+
const setupCommands = [
76+
'mkdir -p /github',
77+
'cp -r /__w/_temp/_github_home /github/home',
78+
'cp -r /__w/_temp/_github_workflow /github/workflow'
79+
]
80+
81+
try {
82+
await execPodStep(
83+
['sh', '-c', shlex.quote(setupCommands.join(' && '))],
84+
state.jobPod,
85+
JOB_CONTAINER_NAME
86+
)
87+
} catch (err) {
88+
core.debug(`Failed to copy GitHub directories: ${JSON.stringify(err)}`)
89+
}
90+
7491
// Execute the entrypoint script
7592
args.entryPoint = 'sh'
7693
args.entryPointArgs = ['-e', containerPath]

0 commit comments

Comments
 (0)