Files
component-detection-depende…/index.ts
T
2023-01-22 01:06:08 +00:00

37 lines
787 B
TypeScript

import * as core from '@actions/core';
import * as github from '@actions/github';
import {
PackageCache,
BuildTarget,
Package,
Snapshot,
Manifest,
submitSnapshot
} from '@github/dependency-submission-toolkit';
import ComponentDetection from './componentDetection';
async function run() {
let manifests = await ComponentDetection.scanAndGetManifests(core.getInput('path'));
let snapshot = new Snapshot({
name: "Component Detection",
version: "0.0.1",
url: "https://github.com/jhutchings1/component-detection-action",
},
github.context,
{
correlator:`${github.context.job}`,
id: github.context.runId.toString()
});
manifests?.forEach(manifest => {
snapshot.addManifest(manifest);
});
submitSnapshot(snapshot);
}
run();