mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 08:36:45 +00:00
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:
@@ -28,7 +28,13 @@ export async function runContainerStep(
|
|||||||
|
|
||||||
let secretName: string | undefined = undefined
|
let secretName: string | undefined = undefined
|
||||||
if (stepContainer.environmentVariables) {
|
if (stepContainer.environmentVariables) {
|
||||||
secretName = await createSecretForEnvs(stepContainer.environmentVariables)
|
try {
|
||||||
|
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()
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user