Remove distrust of GITHUB_ACTION_REF for local actions
This commit is contained in:
parent
07720c700e
commit
3835e64c38
3 changed files with 3 additions and 12 deletions
6
lib/actions-util.js
generated
6
lib/actions-util.js
generated
|
|
@ -501,11 +501,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
||||||
}
|
}
|
||||||
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
|
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
|
||||||
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
|
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
|
const actionRef = process.env["GITHUB_ACTION_REF"];
|
||||||
// See https://github.com/actions/runner/issues/803
|
|
||||||
const actionRef = isRunningLocalAction()
|
|
||||||
? undefined
|
|
||||||
: process.env["GITHUB_ACTION_REF"];
|
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
workflow_run_id: workflowRunID,
|
workflow_run_id: workflowRunID,
|
||||||
workflow_name: workflowName,
|
workflow_name: workflowName,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -667,12 +667,7 @@ export async function createStatusReportBase(
|
||||||
}
|
}
|
||||||
const runnerOs = getRequiredEnvParam("RUNNER_OS");
|
const runnerOs = getRequiredEnvParam("RUNNER_OS");
|
||||||
const codeQlCliVersion = getCachedCodeQlVersion();
|
const codeQlCliVersion = getCachedCodeQlVersion();
|
||||||
|
const actionRef = process.env["GITHUB_ACTION_REF"];
|
||||||
// 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 statusReport: StatusReportBase = {
|
const statusReport: StatusReportBase = {
|
||||||
workflow_run_id: workflowRunID,
|
workflow_run_id: workflowRunID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue