mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Make dependency-submission and setup-gradle play nicely
Now, a `dependency-submission` step will trigger a dependency-graph generation, even if it follows a `setup-gradle` step in the workflow. Similarly, a `setup-gradle` step with `dependency-graph` configured will function as expected even if it follows a `setup-gradle` step.
This commit is contained in:
@@ -23,6 +23,7 @@ const DEPENDENCY_GRAPH_PREFIX = 'dependency-graph_'
|
||||
|
||||
export async function setup(option: DependencyGraphOption): Promise<void> {
|
||||
if (option === DependencyGraphOption.Disabled) {
|
||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'false')
|
||||
return
|
||||
}
|
||||
// Download and submit early, for compatability with dependency review.
|
||||
@@ -32,7 +33,7 @@ export async function setup(option: DependencyGraphOption): Promise<void> {
|
||||
}
|
||||
|
||||
core.info('Enabling dependency graph generation')
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true')
|
||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', 'true')
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE', getDependencyGraphContinueOnFailure())
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR', getJobCorrelator())
|
||||
maybeExportVariable('GITHUB_DEPENDENCY_GRAPH_JOB_ID', github.context.runId)
|
||||
|
||||
Reference in New Issue
Block a user