mirror of
https://github.com/gradle/actions.git
synced 2025-12-08 17:15:46 +08:00
Generated graph is submitted immediately by dependency-submission action
While `setup-gradle` must wait until the end of job to submit all of the generated graphs, the `dependency-submission` action will not save/upload the generated graph immediately, in the same step where it is generated.
This commit is contained in:
@@ -42,6 +42,8 @@ export async function run(): Promise<void> {
|
||||
const args: string[] = parseArgsStringToArgv(executionArgs)
|
||||
const buildRootDirectory = layout.buildRootDirectory()
|
||||
await execution.executeGradleBuild(executable, buildRootDirectory, args)
|
||||
|
||||
await dependencyGraph.complete(config)
|
||||
} catch (error) {
|
||||
core.setFailed(String(error))
|
||||
if (error instanceof Error && error.stack) {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as setupGradle from '../setup-gradle'
|
||||
import * as dependencyGraph from '../dependency-graph'
|
||||
|
||||
import {CacheConfig, DependencyGraphConfig, SummaryConfig} from '../input-params'
|
||||
import {CacheConfig, SummaryConfig} from '../input-params'
|
||||
import {PostActionJobFailure} from '../errors'
|
||||
|
||||
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
|
||||
@@ -15,10 +14,7 @@ process.on('uncaughtException', e => handleFailure(e))
|
||||
*/
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
if (await setupGradle.complete(new CacheConfig(), new SummaryConfig())) {
|
||||
// Only submit the dependency graphs once per job
|
||||
await dependencyGraph.complete(new DependencyGraphConfig())
|
||||
}
|
||||
await setupGradle.complete(new CacheConfig(), new SummaryConfig())
|
||||
} catch (error) {
|
||||
if (error instanceof PostActionJobFailure) {
|
||||
core.setFailed(String(error))
|
||||
|
||||
Reference in New Issue
Block a user