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:
Daz DeBoer 2021-07-20 11:44:56 -06:00
parent b9684c0cf5
commit 02d4f46354
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
7 changed files with 26 additions and 54 deletions

View file

@ -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
}