-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
33 lines (26 loc) · 829 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const core = require('@actions/core');
const github = require('@actions/github');
const fs = require('fs');
const glob = require('glob');
const toolkit = require('@github/dependency-submission-toolkit');
const lib = require('./lib');
const VERSION = "0.1.1";
async function run() {
let manifests = lib.getManifestsFromSpdxFiles(lib.searchFiles());
const correlator = core.getInput('correlator');
let snapshot = new toolkit.Snapshot({
name: "spdx-to-dependency-graph-action",
version: VERSION,
url: "https://github.com/advanced-security/spdx-dependency-submission-action",
},
github.context,
{
correlator: correlator,
id: github.context.runId.toString()
});
manifests?.forEach(manifest => {
snapshot.addManifest(manifest);
});
toolkit.submitSnapshot(snapshot);
}
run();