Add runner OS and arch to status report
This commit is contained in:
parent
e4766c87d5
commit
3615d8ac45
3 changed files with 14 additions and 1 deletions
4
lib/actions-util.js
generated
4
lib/actions-util.js
generated
|
|
@ -498,6 +498,8 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||
workflowStartedAt = actionStartedAt.toISOString();
|
||||
core.exportVariable(sharedEnv.CODEQL_WORKFLOW_STARTED_AT, workflowStartedAt);
|
||||
}
|
||||
const runnerOs = process.env["RUNNER_OS"] || "";
|
||||
const runnerArch = process.env["RUNNER_ARCH"] || "";
|
||||
// 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()
|
||||
|
|
@ -516,6 +518,8 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||
started_at: workflowStartedAt,
|
||||
action_started_at: actionStartedAt.toISOString(),
|
||||
status,
|
||||
runner_os: runnerOs,
|
||||
runner_arch: runnerArch,
|
||||
};
|
||||
// Add optional parameters
|
||||
if (cause) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -596,6 +596,10 @@ export interface StatusReportBase {
|
|||
cause?: string;
|
||||
/** Stack trace of the failure (or undefined if status is not failure). */
|
||||
exception?: string;
|
||||
/** Action runner operating system (context runner.os). */
|
||||
runner_os: string;
|
||||
/** Action runner hardware architecture (context runner.arch). */
|
||||
runner_arch: string;
|
||||
}
|
||||
|
||||
export function getActionsStatus(
|
||||
|
|
@ -643,6 +647,9 @@ export async function createStatusReportBase(
|
|||
workflowStartedAt
|
||||
);
|
||||
}
|
||||
const runnerOs = process.env["RUNNER_OS"] || "";
|
||||
const runnerArch = process.env["RUNNER_ARCH"] || "";
|
||||
|
||||
// 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()
|
||||
|
|
@ -662,6 +669,8 @@ export async function createStatusReportBase(
|
|||
started_at: workflowStartedAt,
|
||||
action_started_at: actionStartedAt.toISOString(),
|
||||
status,
|
||||
runner_os: runnerOs,
|
||||
runner_arch: runnerArch,
|
||||
};
|
||||
|
||||
// Add optional parameters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue