Merge pull request #1174 from github/edoardo/remove-workaround

Remove distrust of `GITHUB_ACTION_REF` for local actions
This commit is contained in:
Edoardo Pirovano 2022-08-10 11:50:11 +01:00 committed by GitHub
commit c7db5d9226
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

6
lib/actions-util.js generated
View file

@ -501,11 +501,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
}
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
// If running locally then the GITHUB_ACTION_REF cannot be trusted as it may be for the previous action
// See https://github.com/actions/runner/issues/803
const actionRef = isRunningLocalAction()
? undefined
: process.env["GITHUB_ACTION_REF"];
const actionRef = process.env["GITHUB_ACTION_REF"];
const statusReport = {
workflow_run_id: workflowRunID,
workflow_name: workflowName,

File diff suppressed because one or more lines are too long

View file

@ -667,12 +667,7 @@ export async function createStatusReportBase(
}
const runnerOs = getRequiredEnvParam("RUNNER_OS");
const codeQlCliVersion = getCachedCodeQlVersion();
// If running locally then the GITHUB_ACTION_REF cannot be trusted as it may be for the previous action
// See https://github.com/actions/runner/issues/803
const actionRef = isRunningLocalAction()
? undefined
: process.env["GITHUB_ACTION_REF"];
const actionRef = process.env["GITHUB_ACTION_REF"];
const statusReport: StatusReportBase = {
workflow_run_id: workflowRunID,