mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-07-05 23:05:54 +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
|
@ -4,7 +4,6 @@ import fs from 'fs'
|
|||
import * as core from '@actions/core'
|
||||
import * as cache from '@actions/cache'
|
||||
|
||||
import * as github from './github-utils'
|
||||
import * as crypto from './crypto-utils'
|
||||
|
||||
import {inputCacheKeyGlobs, tryDeleteFiles} from './cache-dependencies'
|
||||
|
@ -22,7 +21,7 @@ export async function restoreCachedConfiguration(
|
|||
if (fs.existsSync(cachePath)) return
|
||||
core.saveState(CONFIGURATION_CACHE_PATH, cachePath)
|
||||
|
||||
const inputCacheExact = github.inputBoolean('configuration-cache-exact')
|
||||
const inputCacheExact = core.getBooleanInput('configuration-cache-exact')
|
||||
const cacheKeyGlobs = inputCacheKeyGlobs('configuration-cache-key')
|
||||
|
||||
const hash = await crypto.hashFiles(rootDir, cacheKeyGlobs)
|
||||
|
@ -93,5 +92,5 @@ export async function cacheConfiguration(): Promise<void> {
|
|||
}
|
||||
|
||||
function isConfigurationCacheDisabled(): boolean {
|
||||
return !github.inputBoolean('configuration-cache-enabled', false)
|
||||
return !core.getBooleanInput('configuration-cache-enabled')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue