mirror of
https://github.com/gradle/gradle-build-action
synced 2024-11-27 12:02:15 +00:00
Remove defunct generate actions
This commit is contained in:
parent
063cc1c708
commit
ee7ca6ac9b
6 changed files with 3 additions and 85 deletions
|
@ -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'
|
|
@ -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'
|
|
@ -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",
|
||||
|
|
|
@ -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<void> {
|
||||
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()
|
|
@ -1,16 +0,0 @@
|
|||
import * as core from '@actions/core'
|
||||
import * as dependencyGraph from './dependency-graph'
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
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()
|
|
@ -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<void> {
|
|||
}
|
||||
}
|
||||
|
||||
export async function generateDependencyGraph(executable: string | undefined): Promise<void> {
|
||||
const buildRootDirectory = layout.buildRootDirectory()
|
||||
|
||||
const args = [':GitHubDependencyGraphPlugin_generateDependencyGraph']
|
||||
|
||||
await execution.executeGradleBuild(executable, buildRootDirectory, args)
|
||||
}
|
||||
|
||||
export async function uploadDependencyGraphs(): Promise<string[]> {
|
||||
async function uploadDependencyGraphs(): Promise<string[]> {
|
||||
const workspaceDirectory = layout.workspaceDirectory()
|
||||
const graphFiles = await findDependencyGraphFiles(workspaceDirectory)
|
||||
|
||||
|
@ -66,7 +57,7 @@ export async function uploadDependencyGraphs(): Promise<string[]> {
|
|||
return graphFiles
|
||||
}
|
||||
|
||||
export async function downloadAndSubmitDependencyGraphs(): Promise<void> {
|
||||
async function downloadAndSubmitDependencyGraphs(): Promise<void> {
|
||||
const workspaceDirectory = layout.workspaceDirectory()
|
||||
submitDependencyGraphs(await retrieveDependencyGraphs(workspaceDirectory))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue