mirror of
https://github.com/github/codeql-action.git
synced 2026-05-04 12:50:14 +00:00
Upload quality only sarif
This commit is contained in:
@@ -18,6 +18,11 @@ inputs:
|
||||
required: false
|
||||
# If changing this, make sure to update workflow.ts accordingly.
|
||||
default: "always"
|
||||
upload-quality-only:
|
||||
description: >-
|
||||
This is not recommended for external users since it complicates debugging. Upload the SARIF file to Code Quality only.
|
||||
Defaults to 'false' which uploads the generated SARIFs to both Code Scanning and Code Quality.
|
||||
'true' only uploads the SARIF file to Code Quality.
|
||||
cleanup-level:
|
||||
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --cache-cleanup flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
|
||||
required: false
|
||||
|
||||
+14
-9
@@ -331,16 +331,21 @@ async function run() {
|
||||
core.setOutput("db-locations", dbLocations);
|
||||
core.setOutput("sarif-output", path.resolve(outputDir));
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
const uploadQualityOnly = actionsUtil.getOptionalInput(
|
||||
"upload-quality-only",
|
||||
);
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFiles(
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.getOptionalInput("category"),
|
||||
features,
|
||||
logger,
|
||||
uploadLib.CodeScanningTarget,
|
||||
);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
if (uploadQualityOnly !== "true") {
|
||||
uploadResult = await uploadLib.uploadFiles(
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.getOptionalInput("category"),
|
||||
features,
|
||||
logger,
|
||||
uploadLib.CodeScanningTarget,
|
||||
);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
}
|
||||
|
||||
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||
const qualityUploadResult = await uploadLib.uploadFiles(
|
||||
|
||||
Reference in New Issue
Block a user