Skip to content

Commit

Permalink
Reset dependency-graph after submission
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Jul 17, 2024
1 parent 5e4fedf commit 2ca8324
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/src/dependency-submission/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as core from '@actions/core'
import * as setupGradle from '../setup-gradle'
import * as gradle from '../execution/gradle'
import * as dependencyGraph from '../dependency-graph'
Expand Down Expand Up @@ -25,6 +26,7 @@ export async function run(): Promise<void> {
await setupGradle.setup(new CacheConfig(), new BuildScanConfig())

// Configure the dependency graph submission
const originallyEnabled = process.env['GITHUB_DEPENDENCY_GRAPH_ENABLED']
const config = new DependencyGraphConfig()
await dependencyGraph.setup(config)

Expand Down Expand Up @@ -53,6 +55,10 @@ export async function run(): Promise<void> {

await dependencyGraph.complete(config)

// Reset the enabled state of dependency graph
core.info(`SETTING GITHUB_DEPENDENCY_GRAPH_ENABLED back TO ${originallyEnabled}`)
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', originallyEnabled)

saveDeprecationState()
} catch (error) {
handleMainActionError(error)
Expand Down

0 comments on commit 2ca8324

Please # to comment.