Report success as well for visibility

This commit is contained in:
Cameron Booth
2020-05-19 10:04:07 -07:00
parent 3dd92068cf
commit 1bb7228652
+4 -2
View File
@@ -3,7 +3,7 @@ import { promises as fs } from "fs";
import { safeLoad } from "js-yaml";
import { basename, extname, join } from "path";
import { Validator as validator } from "jsonschema";
import { endGroup, error, setFailed, startGroup } from '@actions/core';
import { endGroup, error, info, setFailed, startGroup } from '@actions/core';
interface WorkflowWithErrors {
id: string;
@@ -102,12 +102,14 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom
)
if (erroredWorkflows.length > 0) {
startGroup(`Found ${erroredWorkflows.length} workflows with errors:`);
startGroup(`😟 - Found ${erroredWorkflows.length} workflows with errors:`);
erroredWorkflows.forEach(erroredWorkflow => {
error(`Errors in ${erroredWorkflow.id} - ${erroredWorkflow.errors.map(e => e.toString()).join(", ")}`)
})
endGroup();
setFailed(`Found ${erroredWorkflows.length} workflows with errors`);
} else {
info("🎉🤘 - Found no workflows with errors!")
}
} catch (e) {
error(`Unhandled error while syncing workflows: ${e}`);