From bb7a843511648bc4a28cfbd53bdc25a68544433e Mon Sep 17 00:00:00 2001 From: daz Date: Tue, 16 Jul 2024 21:03:12 -0600 Subject: [PATCH] Reset dependency-graph after submission Fixes #204 --- sources/src/dependency-submission/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sources/src/dependency-submission/main.ts b/sources/src/dependency-submission/main.ts index 0e560db1..75c46686 100644 --- a/sources/src/dependency-submission/main.ts +++ b/sources/src/dependency-submission/main.ts @@ -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' @@ -24,6 +25,9 @@ export async function run(): Promise { // Configure Gradle environment (Gradle User Home) await setupGradle.setup(new CacheConfig(), new BuildScanConfig()) + // Capture the enabled state of dependency-graph + const originallyEnabled = process.env['GITHUB_DEPENDENCY_GRAPH_ENABLED'] + // Configure the dependency graph submission const config = new DependencyGraphConfig() await dependencyGraph.setup(config) @@ -53,6 +57,9 @@ export async function run(): Promise { await dependencyGraph.complete(config) + // Reset the enabled state of dependency graph + core.exportVariable('GITHUB_DEPENDENCY_GRAPH_ENABLED', originallyEnabled) + saveDeprecationState() } catch (error) { handleMainActionError(error)