Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
25
src/upload-sarif.ts
Normal file
25
src/upload-sarif.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import * as core from '@actions/core';
|
||||
|
||||
import * as upload_lib from './upload-lib';
|
||||
import * as util from './util';
|
||||
|
||||
async function run() {
|
||||
if (util.should_abort('upload-sarif', false) || !await util.reportActionStarting('upload-sarif')) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await upload_lib.upload(core.getInput('sarif_file'));
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
await util.reportActionFailed('upload-sarif', error.message, error.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
await util.reportActionSucceeded('upload-sarif');
|
||||
}
|
||||
|
||||
run().catch(e => {
|
||||
core.setFailed("upload-sarif action failed: " + e);
|
||||
console.log(e);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue