Clean up DB cluster directory at the end of each job
This commit is contained in:
parent
3d849e9df2
commit
d8d73c0e76
3 changed files with 28 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import * as fs from "fs";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import * as github from "@actions/github";
|
||||
|
||||
|
|
@ -217,6 +219,19 @@ export async function run(
|
|||
await printDebugLogs(config);
|
||||
}
|
||||
|
||||
try {
|
||||
fs.rmSync(config.dbLocation, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
maxRetries: 3,
|
||||
});
|
||||
logger.info(`Cleaned up database cluster directory ${config.dbLocation}.`);
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to clean up database cluster directory ${config.dbLocation}. Details: ${e}`,
|
||||
);
|
||||
}
|
||||
|
||||
return uploadFailedSarifResult;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue