Cleanup CodeQL DBs and output their location for later steps

This commit is contained in:
Edoardo Pirovano 2021-05-24 17:26:13 +01:00 committed by Edoardo Pirovano
parent cbdf0df97b
commit ddb83a462d
12 changed files with 113 additions and 14 deletions

View file

@ -8,6 +8,7 @@ import {
runAnalyze,
CodeQLAnalysisError,
QueriesStatusReport,
runCleanup,
} from "./analyze";
import { Config, getConfig } from "./config-utils";
import { getActionsLogger } from "./logging";
@ -89,6 +90,20 @@ async function run() {
logger
);
if (actionsUtil.getOptionalInput("cleanup-level") !== "none") {
await runCleanup(
config,
actionsUtil.getOptionalInput("cleanup-level") || "brutal",
logger
);
}
const dbLocations: { [lang: string]: string } = {};
for (const language of config.languages) {
dbLocations[language] = util.getCodeQLDatabasePath(config, language);
}
core.setOutput("db-locations", dbLocations);
if (actionsUtil.getRequiredInput("upload") === "true") {
const uploadStats = await upload_lib.uploadFromActions(
outputDir,