Improve logging for combined SARIF debug artifact

This commit is contained in:
Henry Mercer 2024-09-17 11:15:08 +02:00
parent d0a3cf2152
commit 6e24973d7a
9 changed files with 72 additions and 51 deletions

View file

@ -31,13 +31,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const debugArtifacts = __importStar(require("./debug-artifacts"));
const environment_1 = require("./environment");
const logging_1 = require("./logging");
const util_1 = require("./util");
async function runWrapper() {
try {
const logger = (0, logging_1.getActionsLogger)();
// Upload SARIF artifacts if we determine that this is a first-party analysis run.
// For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step.
if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") {
await debugArtifacts.uploadCombinedSarifArtifacts();
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", () => debugArtifacts.uploadCombinedSarifArtifacts(logger));
}
}
catch (error) {