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:
Nikola Jokic
2025-04-17 12:08:32 +02:00
committed by GitHub
parent aae800a69b
commit 375992cd31
7 changed files with 122 additions and 9 deletions

View File

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