Do not fail if the workflow has been deleted
This commit is contained in:
parent
754f502a84
commit
6df1fc5e38
9 changed files with 63 additions and 65 deletions
11
lib/init-action.js
generated
11
lib/init-action.js
generated
|
|
@ -55,14 +55,11 @@ async function run() {
|
|||
let toolsVersion;
|
||||
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);
|
||||
const workflowError = await actionsUtil.getWorkflowError();
|
||||
if (workflowError !== undefined) {
|
||||
core.warning(workflowError);
|
||||
}
|
||||
if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("init", "starting", startedAt, workflowErrorMessage)))) {
|
||||
if (!(await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("init", "starting", startedAt, workflowError)))) {
|
||||
return;
|
||||
}
|
||||
const initCodeQLResult = await init_1.initCodeQL(actionsUtil.getOptionalInput("tools"), actionsUtil.getRequiredInput("token"), actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"), actionsUtil.getRequiredEnvParam("RUNNER_TEMP"), actionsUtil.getRequiredEnvParam("RUNNER_TOOL_CACHE"), "actions", logger);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue