gradle-build-action/src/dependency-graph-submit.ts
daz 4c9c435d2f
Configure Gradle User Home for dependency-graph
Instead of requiring an action step to generate the graph, configure Gradle User Home
so that subsequent Gradle invocations can generate a graph. Any generated graph files
are uploaded as artifacts on job completion.

- Construct job.correlator from workflow/job/matrix
- Export job.correlator as an environment var
- Upload artifacts at job completion in post-action step
- Specify the location of dependency graph report
- Only apply dependency graph init script when explicitly enabled
2023-07-07 20:42:48 -06:00

17 lines
478 B
TypeScript

import * as core from '@actions/core'
import * as dependencyGraph from './dependency-graph'
export async function run(): Promise<void> {
try {
// Retrieve the dependency graph artifact and submit via Dependency Submission API
await dependencyGraph.downloadAndSubmitDependencyGraphs()
} catch (error) {
core.setFailed(String(error))
if (error instanceof Error && error.stack) {
core.info(error.stack)
}
}
}
run()