mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Clean up the database if it will be uploaded
This commit is contained in:
@@ -7,7 +7,7 @@ import { getRequiredInput, getTemporaryDirectory } from "./actions-util";
|
||||
import { type CodeQL } from "./codeql";
|
||||
import { type Config } from "./config-utils";
|
||||
import { getCommitOid, getFileOidsUnderPath } from "./git-utils";
|
||||
import { Logger } from "./logging";
|
||||
import { Logger, withGroupAsync } from "./logging";
|
||||
import { isInTestMode, tryGetFolderBytes, withTimeout } from "./util";
|
||||
|
||||
export enum OverlayDatabaseMode {
|
||||
@@ -206,6 +206,11 @@ export async function uploadOverlayBaseDatabaseToCache(
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clean up the database using the overlay cleanup level.
|
||||
await withGroupAsync("Cleaning up databases", async () => {
|
||||
await codeql.databaseCleanupCluster(config, "overlay");
|
||||
});
|
||||
|
||||
const dbLocation = config.dbLocation;
|
||||
const codeQlVersion = (await codeql.getVersion()).version;
|
||||
const checkoutPath = getRequiredInput("checkout_path");
|
||||
|
||||
Reference in New Issue
Block a user