diff --git a/actions/dependency-graph-generate/action.yml b/actions/dependency-graph-generate/action.yml deleted file mode 100644 index 3e24b28..0000000 --- a/actions/dependency-graph-generate/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Dependency Graph Generate" -description: Calculates the complete dependency graph for the repository, saving it as a JSON artifact. - -inputs: - gradle-version: - description: Gradle version to use. If specified, this Gradle version will be downloaded, added to the PATH and used for invoking Gradle. - required: false - - gradle-executable: - description: Path to the Gradle executable. If specified, this executable will be added to the PATH and used for invoking Gradle. - required: false - - build-root-directory: - description: Path to the root directory of the build. Default is the root of the GitHub workspace. - required: false - -runs: - using: 'node16' - main: '../../dist/dependency-graph-generate/index.js' diff --git a/actions/dependency-graph-submit/action.yml b/actions/dependency-graph-submit/action.yml deleted file mode 100644 index 4f84887..0000000 --- a/actions/dependency-graph-submit/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: "Dependency Graph Submit" -description: Retrieves a previously created dependency graph JSON and submits via the GitHub Dependency Submission API. - -inputs: - github-token: - description: The GitHub token used to authenticate when submitting via the Dependency Submission API. - default: ${{ github.token }} - required: false - -runs: - using: 'node16' - main: '../../dist/dependency-graph-submit/index.js' diff --git a/package.json b/package.json index ed97cfb..f8ba89c 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,7 @@ "compile-main": "ncc build src/main.ts --out dist/main --source-map --no-source-map-register", "compile-post": "ncc build src/post.ts --out dist/post --source-map --no-source-map-register", - "compile-dependency-graph-generate": "ncc build src/dependency-graph-generate.ts --out dist/dependency-graph-generate --source-map --no-source-map-register", - "compile-dependency-graph-submit": "ncc build src/dependency-graph-submit.ts --out dist/dependency-graph-submit --source-map --no-source-map-register", - "compile": "npm run compile-main && npm run compile-post && npm run compile-dependency-graph-generate && npm run compile-dependency-graph-submit", + "compile": "npm run compile-main && npm run compile-post", "test": "jest", "check": "npm run format && npm run lint", diff --git a/src/dependency-graph-generate.ts b/src/dependency-graph-generate.ts deleted file mode 100644 index 571e91c..0000000 --- a/src/dependency-graph-generate.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as core from '@actions/core' - -import * as provisioner from './provision' -import * as dependencyGraph from './dependency-graph' - -/** - * The main entry point for the action, called by Github Actions for the step. - */ -export async function run(): Promise { - try { - // Download and install Gradle if required - const executable = await provisioner.provisionGradle() - - // Generate and upload dependency graph artifact - await dependencyGraph.generateDependencyGraph(executable) - } catch (error) { - core.setFailed(String(error)) - if (error instanceof Error && error.stack) { - core.info(error.stack) - } - } -} - -run() diff --git a/src/dependency-graph-submit.ts b/src/dependency-graph-submit.ts deleted file mode 100644 index c6d1c98..0000000 --- a/src/dependency-graph-submit.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as core from '@actions/core' -import * as dependencyGraph from './dependency-graph' - -export async function run(): Promise { - try { - // Retrieve the dependency graph artifact and submit via Dependency Submission API - await dependencyGraph.downloadAndSubmitDependencyGraphs() - } catch (error) { - core.setFailed(String(error)) - if (error instanceof Error && error.stack) { - core.info(error.stack) - } - } -} - -run() diff --git a/src/dependency-graph.ts b/src/dependency-graph.ts index 0c674a4..bc130d7 100644 --- a/src/dependency-graph.ts +++ b/src/dependency-graph.ts @@ -8,7 +8,6 @@ import {Octokit} from '@octokit/rest' import * as path from 'path' import fs from 'fs' -import * as execution from './execution' import * as layout from './repository-layout' import {DependencyGraphOption, getJobMatrix} from './input-params' @@ -45,15 +44,7 @@ export async function complete(option: DependencyGraphOption): Promise { } } -export async function generateDependencyGraph(executable: string | undefined): Promise { - const buildRootDirectory = layout.buildRootDirectory() - - const args = [':GitHubDependencyGraphPlugin_generateDependencyGraph'] - - await execution.executeGradleBuild(executable, buildRootDirectory, args) -} - -export async function uploadDependencyGraphs(): Promise { +async function uploadDependencyGraphs(): Promise { const workspaceDirectory = layout.workspaceDirectory() const graphFiles = await findDependencyGraphFiles(workspaceDirectory) @@ -66,7 +57,7 @@ export async function uploadDependencyGraphs(): Promise { return graphFiles } -export async function downloadAndSubmitDependencyGraphs(): Promise { +async function downloadAndSubmitDependencyGraphs(): Promise { const workspaceDirectory = layout.workspaceDirectory() submitDependencyGraphs(await retrieveDependencyGraphs(workspaceDirectory)) }