Re-export codeql testing environment variable to subsequent steps, if set.

This commit is contained in:
Cornelius Riemenschneider 2022-11-01 13:18:25 +01:00
parent 4b73c4f99e
commit bfcbb093ac
6 changed files with 22 additions and 5 deletions

7
lib/actions-util.js generated
View file

@ -502,7 +502,12 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
const actionRef = process.env["GITHUB_ACTION_REF"];
const testingEnvironment = process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] || "";
const testingEnvironment = process.env[sharedEnv.CODEQL_ACTION_TESTING_ENVIRONMENT] || "";
// re-export the testing environment variable so that it is available to subsequent steps,
// even if it was only set for this step
if (testingEnvironment !== "") {
core.exportVariable(sharedEnv.CODEQL_ACTION_TESTING_ENVIRONMENT, testingEnvironment);
}
const statusReport = {
workflow_run_id: workflowRunID,
workflow_name: workflowName,