mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 16:56:12 +02:00
Use core functionality to access action inputs
- Specify default values in action.yaml definition where appropriate - Replace custom methods with core functions: - getInputBoolean() with core.getBooleanInput() - inputOrNull() with core.getInput() - inputArrayOrNull() with core.getMultilineInput() - Remove github-utils.js
This commit is contained in:
parent
b9684c0cf5
commit
02d4f46354
7 changed files with 26 additions and 54 deletions
|
@ -5,8 +5,6 @@ import * as os from 'os'
|
|||
import * as core from '@actions/core'
|
||||
import * as cache from '@actions/cache'
|
||||
|
||||
import * as github from './github-utils'
|
||||
|
||||
const WRAPPER_SLUG = 'WRAPPER_SLUG'
|
||||
|
||||
export async function restoreCachedWrapperDist(
|
||||
|
@ -108,13 +106,9 @@ export function extractGradleWrapperSlugFromDistUri(
|
|||
|
||||
function isWrapperCacheDisabled(): boolean {
|
||||
// Check if either 'distributions' or 'wrapper' cache has been disabled
|
||||
const wrapperCacheEnabled = github.inputBoolean(
|
||||
'wrapper-cache-enabled',
|
||||
true
|
||||
)
|
||||
const distributionsCacheEnabled = github.inputBoolean(
|
||||
'distributions-cache-enabled',
|
||||
true
|
||||
const wrapperCacheEnabled = core.getBooleanInput('wrapper-cache-enabled')
|
||||
const distributionsCacheEnabled = core.getBooleanInput(
|
||||
'distributions-cache-enabled'
|
||||
)
|
||||
return !wrapperCacheEnabled || !distributionsCacheEnabled
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue