mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-18 02:36:44 +00:00
Expose CI=true and GITHUB_ACTIONS env variables (#215)
* Expose CI=true and GITHUB_ACTIONS env variables * fmt * revert the prettier and finish this * revert package-lock.json
This commit is contained in:
@@ -29,7 +29,14 @@ export async function runContainerStep(
|
||||
let secretName: string | undefined = undefined
|
||||
if (stepContainer.environmentVariables) {
|
||||
try {
|
||||
secretName = await createSecretForEnvs(stepContainer.environmentVariables)
|
||||
const envs = JSON.parse(
|
||||
JSON.stringify(stepContainer.environmentVariables)
|
||||
)
|
||||
envs['GITHUB_ACTIONS'] = 'true'
|
||||
if (!('CI' in envs)) {
|
||||
envs.CI = 'true'
|
||||
}
|
||||
secretName = await createSecretForEnvs(envs)
|
||||
} catch (err) {
|
||||
core.debug(`createSecretForEnvs failed: ${JSON.stringify(err)}`)
|
||||
const message = (err as any)?.response?.body?.message || err
|
||||
|
||||
Reference in New Issue
Block a user