allow a list of files for repositoryCacheConfig (#117)
--------- Co-authored-by: Karthik Sethuraman <ksethuraman@linkedin.com>
This commit is contained in:
parent
5528b8082a
commit
905421c656
6 changed files with 98534 additions and 98923 deletions
|
|
@ -6,7 +6,6 @@ const github = require('@actions/github')
|
|||
|
||||
const bazeliskVersion = core.getInput('bazelisk-version')
|
||||
const cacheVersion = core.getInput('cache-version')
|
||||
const externalCacheConfig = yaml.parse(core.getInput('external-cache'))
|
||||
const moduleRoot = core.getInput('module-root')
|
||||
|
||||
const homeDir = os.homedir()
|
||||
|
|
@ -59,8 +58,8 @@ if (diskCacheEnabled) {
|
|||
}
|
||||
}
|
||||
|
||||
const repositoryCacheConfig = core.getInput('repository-cache')
|
||||
const repositoryCacheEnabled = repositoryCacheConfig !== 'false'
|
||||
const repositoryCacheConfig = yaml.parse(core.getInput('repository-cache'))
|
||||
const repositoryCacheEnabled = repositoryCacheConfig !== false
|
||||
let repositoryCacheFiles = [
|
||||
`${moduleRoot}/MODULE.bazel`,
|
||||
`${moduleRoot}/WORKSPACE.bazel`,
|
||||
|
|
@ -69,7 +68,7 @@ let repositoryCacheFiles = [
|
|||
]
|
||||
if (repositoryCacheEnabled) {
|
||||
bazelrc.push(`common --repository_cache=${bazelRepository}`)
|
||||
if (repositoryCacheConfig !== 'true') {
|
||||
if (repositoryCacheConfig !== true) {
|
||||
repositoryCacheFiles = Array(repositoryCacheConfig).flat()
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +83,7 @@ if (googleCredentials.length > 0 && !googleCredentialsSaved) {
|
|||
core.saveState('google-credentials-path', googleCredentialsPath)
|
||||
}
|
||||
|
||||
const externalCacheConfig = yaml.parse(core.getInput('external-cache'))
|
||||
const bazelExternal = core.toPosixPath(`${bazelOutputBase}/external`)
|
||||
const externalCache = {}
|
||||
if (externalCacheConfig) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue