Improve logging for combined SARIF debug artifact
This commit is contained in:
parent
d0a3cf2152
commit
6e24973d7a
9 changed files with 72 additions and 51 deletions
|
|
@ -7,14 +7,19 @@ import * as core from "@actions/core";
|
|||
|
||||
import * as debugArtifacts from "./debug-artifacts";
|
||||
import { EnvVar } from "./environment";
|
||||
import { getActionsLogger, withGroup } from "./logging";
|
||||
import { getErrorMessage } from "./util";
|
||||
|
||||
async function runWrapper() {
|
||||
try {
|
||||
const logger = 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[EnvVar.INIT_ACTION_HAS_RUN] === "true") {
|
||||
await debugArtifacts.uploadCombinedSarifArtifacts();
|
||||
await withGroup("Uploading combined SARIF debug artifact", () =>
|
||||
debugArtifacts.uploadCombinedSarifArtifacts(logger),
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue