mirror of
https://github.com/gradle/actions.git
synced 2025-12-08 17:15:46 +08:00
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
This commit is contained in:
@@ -6,6 +6,7 @@ import * as os from 'os'
|
||||
import * as caches from './caches'
|
||||
import * as layout from './repository-layout'
|
||||
import * as params from './input-params'
|
||||
import * as dependencyGraph from './dependency-graph'
|
||||
|
||||
import {logJobSummary, writeJobSummary} from './job-summary'
|
||||
import {loadBuildResults} from './build-results'
|
||||
@@ -36,6 +37,10 @@ export async function setup(): Promise<void> {
|
||||
await caches.restore(gradleUserHome, cacheListener)
|
||||
|
||||
core.saveState(CACHE_LISTENER, cacheListener.stringify())
|
||||
|
||||
if (params.isDependencyGraphEnabled()) {
|
||||
dependencyGraph.prepare()
|
||||
}
|
||||
}
|
||||
|
||||
export async function complete(): Promise<void> {
|
||||
@@ -58,6 +63,10 @@ export async function complete(): Promise<void> {
|
||||
} else {
|
||||
logJobSummary(buildResults, cacheListener)
|
||||
}
|
||||
|
||||
if (params.isDependencyGraphEnabled()) {
|
||||
dependencyGraph.uploadDependencyGraphs()
|
||||
}
|
||||
}
|
||||
|
||||
async function determineGradleUserHome(): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user