Log job status in init-post
This commit is contained in:
parent
f195496548
commit
e402144d13
6 changed files with 40 additions and 3 deletions
17
lib/status-report.js
generated
17
lib/status-report.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sendStatusReport = exports.createStatusReportBase = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
||||
exports.sendStatusReport = exports.createStatusReportBase = exports.getJobStatusDisplayName = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
||||
const os = __importStar(require("os"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
|
|
@ -71,6 +71,21 @@ function getActionsStatus(error, otherFailureCause) {
|
|||
}
|
||||
}
|
||||
exports.getActionsStatus = getActionsStatus;
|
||||
function getJobStatusDisplayName(status) {
|
||||
switch (status) {
|
||||
case JobStatus.SuccessStatus:
|
||||
return "success";
|
||||
case JobStatus.FailureStatus:
|
||||
return "failure";
|
||||
case JobStatus.ConfigErrorStatus:
|
||||
return "configuration error";
|
||||
case JobStatus.UnknownStatus:
|
||||
return "unknown";
|
||||
default:
|
||||
(0, util_1.assertNever)(status);
|
||||
}
|
||||
}
|
||||
exports.getJobStatusDisplayName = getJobStatusDisplayName;
|
||||
/**
|
||||
* Sets the overall job status environment variable to configuration error
|
||||
* or failure, unless it's already been set to one of these values in a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue