Merge pull request #2598 from github/mbg/fix/validateWorkflowResult
Log result of `validateWorkflow` if not `undefined`
This commit is contained in:
commit
a1695c562b
3 changed files with 12 additions and 3 deletions
6
lib/init-action.js
generated
6
lib/init-action.js
generated
|
|
@ -169,9 +169,13 @@ async function run() {
|
||||||
toolsSource = initCodeQLResult.toolsSource;
|
toolsSource = initCodeQLResult.toolsSource;
|
||||||
zstdAvailability = initCodeQLResult.zstdAvailability;
|
zstdAvailability = initCodeQLResult.zstdAvailability;
|
||||||
core.startGroup("Validating workflow");
|
core.startGroup("Validating workflow");
|
||||||
if ((await (0, workflow_1.validateWorkflow)(codeql, logger)) === undefined) {
|
const validateWorkflowResult = await (0, workflow_1.validateWorkflow)(codeql, logger);
|
||||||
|
if (validateWorkflowResult === undefined) {
|
||||||
logger.info("Detected no issues with the code scanning workflow.");
|
logger.info("Detected no issues with the code scanning workflow.");
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
logger.warning(`Unable to validate code scanning workflow: ${validateWorkflowResult}`);
|
||||||
|
}
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
config = await (0, init_1.initConfig)({
|
config = await (0, init_1.initConfig)({
|
||||||
languagesInput: (0, actions_util_1.getOptionalInput)("languages"),
|
languagesInput: (0, actions_util_1.getOptionalInput)("languages"),
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -329,8 +329,13 @@ async function run() {
|
||||||
zstdAvailability = initCodeQLResult.zstdAvailability;
|
zstdAvailability = initCodeQLResult.zstdAvailability;
|
||||||
|
|
||||||
core.startGroup("Validating workflow");
|
core.startGroup("Validating workflow");
|
||||||
if ((await validateWorkflow(codeql, logger)) === undefined) {
|
const validateWorkflowResult = await validateWorkflow(codeql, logger);
|
||||||
|
if (validateWorkflowResult === undefined) {
|
||||||
logger.info("Detected no issues with the code scanning workflow.");
|
logger.info("Detected no issues with the code scanning workflow.");
|
||||||
|
} else {
|
||||||
|
logger.warning(
|
||||||
|
`Unable to validate code scanning workflow: ${validateWorkflowResult}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue