Add workflow_run_attempt data to status report (#1640)
This commit is contained in:
parent
d7b9dcdb85
commit
98f7bbd610
7 changed files with 23 additions and 9 deletions
6
lib/actions-util.js
generated
6
lib/actions-util.js
generated
|
|
@ -295,6 +295,11 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||
if (workflowRunIDStr) {
|
||||
workflowRunID = parseInt(workflowRunIDStr, 10);
|
||||
}
|
||||
const workflowRunAttemptStr = process.env["GITHUB_RUN_ATTEMPT"];
|
||||
let workflowRunAttempt = -1;
|
||||
if (workflowRunAttemptStr) {
|
||||
workflowRunAttempt = parseInt(workflowRunAttemptStr, 10);
|
||||
}
|
||||
const workflowName = process.env["GITHUB_WORKFLOW"] || "";
|
||||
const jobName = process.env["GITHUB_JOB"] || "";
|
||||
const analysis_key = await getAnalysisKey();
|
||||
|
|
@ -314,6 +319,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
|
|||
}
|
||||
const statusReport = {
|
||||
workflow_run_id: workflowRunID,
|
||||
workflow_run_attempt: workflowRunAttempt,
|
||||
workflow_name: workflowName,
|
||||
job_name: jobName,
|
||||
analysis_key,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
6
lib/util.js
generated
6
lib/util.js
generated
|
|
@ -337,9 +337,9 @@ exports.assertNever = assertNever;
|
|||
* knowing what version of CodeQL we're running.
|
||||
*/
|
||||
function initializeEnvironment(version) {
|
||||
core.exportVariable(shared_environment_1.EnvVar.VERSION, version);
|
||||
core.exportVariable(shared_environment_1.EnvVar.FEATURE_SARIF_COMBINE, "true");
|
||||
core.exportVariable(shared_environment_1.EnvVar.FEATURE_WILL_UPLOAD, "true");
|
||||
core.exportVariable(String(shared_environment_1.EnvVar.VERSION), version);
|
||||
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_SARIF_COMBINE), "true");
|
||||
core.exportVariable(String(shared_environment_1.EnvVar.FEATURE_WILL_UPLOAD), "true");
|
||||
}
|
||||
exports.initializeEnvironment = initializeEnvironment;
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue