feat(k8s): add /github/home to containerAction mounts and surface createSecretForEnvs errors #181 (#198)

* feat: add /github/home to containerAction mounts #181

* fix: add debug logging for failed secret creations #181
This commit is contained in:
Grant Buskey
2025-04-14 08:12:51 -04:00
committed by GitHub
parent 88dc98f8ef
commit ef2229fc0b
2 changed files with 12 additions and 1 deletions

View File

@@ -28,7 +28,13 @@ export async function runContainerStep(
let secretName: string | undefined = undefined let secretName: string | undefined = undefined
if (stepContainer.environmentVariables) { if (stepContainer.environmentVariables) {
try {
secretName = await createSecretForEnvs(stepContainer.environmentVariables) secretName = await createSecretForEnvs(stepContainer.environmentVariables)
} catch (err) {
core.debug(`createSecretForEnvs failed: ${JSON.stringify(err)}`)
const message = (err as any)?.response?.body?.message || err
throw new Error(`failed to create script environment: ${message}`)
}
} }
const extension = readExtensionFromFile() const extension = readExtensionFromFile()

View File

@@ -42,6 +42,11 @@ export function containerVolumes(
mountPath: '/github/file_commands', mountPath: '/github/file_commands',
subPath: '_temp/_runner_file_commands' subPath: '_temp/_runner_file_commands'
}, },
{
name: POD_VOLUME_NAME,
mountPath: '/github/home',
subPath: '_temp/_github_home'
},
{ {
name: POD_VOLUME_NAME, name: POD_VOLUME_NAME,
mountPath: '/github/workflow', mountPath: '/github/workflow',