Write a warning if there is an error with the workflow
This commit is contained in:
parent
7eb9dfcc60
commit
33bb87523e
9 changed files with 92 additions and 61 deletions
|
|
@ -96,9 +96,29 @@ async function run() {
|
|||
try {
|
||||
actionsUtil.prepareLocalRunEnvironment();
|
||||
|
||||
const workflowErrors = actionsUtil.validateWorkflow(
|
||||
await actionsUtil.getWorkflow()
|
||||
);
|
||||
|
||||
const workflowErrorMessage =
|
||||
workflowErrors.length > 0
|
||||
? `${workflowErrors.length} issue${
|
||||
workflowErrors.length === 1 ? " was" : "s were"
|
||||
} detected with this workflow: ${workflowErrors.join(", ")}`
|
||||
: undefined;
|
||||
|
||||
if (workflowErrorMessage !== undefined) {
|
||||
core.warning(workflowErrorMessage);
|
||||
}
|
||||
|
||||
if (
|
||||
!(await actionsUtil.sendStatusReport(
|
||||
await actionsUtil.createStatusReportBase("init", "starting", startedAt)
|
||||
await actionsUtil.createStatusReportBase(
|
||||
"init",
|
||||
"starting",
|
||||
startedAt,
|
||||
workflowErrorMessage
|
||||
)
|
||||
))
|
||||
) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue