Emit deprecation warning for 'gradle-build-action'

This commit is contained in:
daz
2024-04-09 14:09:02 -06:00
parent 7e9e469530
commit aeb3156e6f
6 changed files with 64 additions and 25 deletions

View File

@@ -7,6 +7,8 @@ import {SUMMARY_ENV_VAR} from '@actions/core/lib/summary'
import {parseArgsStringToArgv} from 'string-argv'
import path from 'path'
const ACTION_ID_VAR = 'GRADLE_ACTION_ID'
export class DependencyGraphConfig {
getDependencyGraphOption(): DependencyGraphOption {
const val = core.getInput('dependency-graph')
@@ -272,6 +274,14 @@ export function getWorkspaceDirectory(): string {
return process.env[`GITHUB_WORKSPACE`] || ''
}
export function getActionId(): string | undefined {
return process.env[ACTION_ID_VAR]
}
export function setActionId(id: string): void {
core.exportVariable(ACTION_ID_VAR, id)
}
export function parseNumericInput(paramName: string, paramValue: string, paramDefault: number): number {
if (paramValue.length === 0) {
return paramDefault