Add RUNNER_ENVIRONMENT to ActionsEnvVars

This commit is contained in:
Michael B. Gale
2026-07-09 14:31:08 +01:00
parent a440e35eda
commit 80dcb7ccdf
5 changed files with 8 additions and 6 deletions

4
lib/entry-points.js generated
View File

@@ -145330,7 +145330,7 @@ var getFileType = async (filePath) => {
}
};
function isSelfHostedRunner(env = getEnv()) {
return env.getOptional("RUNNER_ENVIRONMENT") === "self-hosted";
return env.getOptional("RUNNER_ENVIRONMENT" /* RUNNER_ENVIRONMENT */) === "self-hosted";
}
function isDynamicWorkflow(env = getEnv()) {
return getWorkflowEventName(env) === "dynamic";
@@ -151679,7 +151679,7 @@ async function setupCppAutobuild(codeql, logger) {
logger
);
if (await features.getValue("cpp_dependency_installation_enabled" /* CppDependencyInstallation */, codeql)) {
if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" && process.env[envVar] !== "true") {
if (process.env["RUNNER_ENVIRONMENT" /* RUNNER_ENVIRONMENT */] === "self-hosted" && process.env[envVar] !== "true") {
logger.info(
`Disabling ${featureName} as we are on a self-hosted runner.${getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` : ""}`
);