Upgrade to latest version of @actons/cache (with -L patch)
This commit is contained in:
parent
596e834564
commit
91e634d3e9
9 changed files with 7 additions and 42 deletions
|
|
@ -48,12 +48,6 @@ Not used when external cache is disabled.
|
|||
|
||||
Default `""`.
|
||||
|
||||
### `use-gnu-tar-on-windows`
|
||||
|
||||
Enable GNU `tar` on Windows to optimize cache performance.
|
||||
|
||||
Default `true`.
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple configuration
|
||||
|
|
|
|||
|
|
@ -32,11 +32,7 @@ inputs:
|
|||
token:
|
||||
description: GitHub token to use for external cache
|
||||
required: false
|
||||
default: ""
|
||||
use-gnu-tar-on-windows:
|
||||
description: Use GNU tar on Windows
|
||||
required: false
|
||||
default: true
|
||||
default: ${{ github.token }}
|
||||
|
||||
runs:
|
||||
using: node16
|
||||
|
|
|
|||
|
|
@ -118,6 +118,5 @@ module.exports = {
|
|||
name: 'repository',
|
||||
paths: [bazelRepository]
|
||||
},
|
||||
token: core.getInput('token'),
|
||||
useGnuTarOnWindows: core.getBooleanInput('use-gnu-tar-on-windows')
|
||||
token: core.getInput('token')
|
||||
}
|
||||
|
|
|
|||
14
dist/main/index.js
vendored
14
dist/main/index.js
vendored
|
|
@ -124,8 +124,7 @@ module.exports = {
|
|||
name: 'repository',
|
||||
paths: [bazelRepository]
|
||||
},
|
||||
token: core.getInput('token'),
|
||||
useGnuTarOnWindows: core.getBooleanInput('use-gnu-tar-on-windows')
|
||||
token: core.getInput('token')
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -74518,7 +74517,6 @@ async function setupBazel () {
|
|||
await setupBazelrc()
|
||||
core.endGroup()
|
||||
|
||||
await useGnuTarOnWindows()
|
||||
await restoreCache(config.bazeliskCache)
|
||||
await restoreCache(config.diskCache)
|
||||
await restoreCache(config.repositoryCache)
|
||||
|
|
@ -74536,16 +74534,6 @@ async function setupBazelrc () {
|
|||
}
|
||||
}
|
||||
|
||||
// https://github.com/actions/cache/blob/main/tips-and-workarounds.md#improving-cache-restore-performance-on-windowsusing-cross-os-caching
|
||||
async function useGnuTarOnWindows () {
|
||||
if (config.useGnuTarOnWindows && config.platform === 'win32') {
|
||||
if (config.bazeliskCache.enabled || config.diskCache.enabled ||
|
||||
config.repositoryCache.enabled || config.externalCache.enabled) {
|
||||
core.addPath('C:\\Program Files\\Git\\usr\\bin')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function restoreExternalCaches (cacheConfig) {
|
||||
if (!cacheConfig.enabled) {
|
||||
return
|
||||
|
|
|
|||
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/post/index.js
vendored
3
dist/post/index.js
vendored
|
|
@ -124,8 +124,7 @@ module.exports = {
|
|||
name: 'repository',
|
||||
paths: [bazelRepository]
|
||||
},
|
||||
token: core.getInput('token'),
|
||||
useGnuTarOnWindows: core.getBooleanInput('use-gnu-tar-on-windows')
|
||||
token: core.getInput('token')
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
11
index.js
11
index.js
|
|
@ -21,7 +21,6 @@ async function setupBazel () {
|
|||
await setupBazelrc()
|
||||
core.endGroup()
|
||||
|
||||
await useGnuTarOnWindows()
|
||||
await restoreCache(config.bazeliskCache)
|
||||
await restoreCache(config.diskCache)
|
||||
await restoreCache(config.repositoryCache)
|
||||
|
|
@ -39,16 +38,6 @@ async function setupBazelrc () {
|
|||
}
|
||||
}
|
||||
|
||||
// https://github.com/actions/cache/blob/main/tips-and-workarounds.md#improving-cache-restore-performance-on-windowsusing-cross-os-caching
|
||||
async function useGnuTarOnWindows () {
|
||||
if (config.useGnuTarOnWindows && config.platform === 'win32') {
|
||||
if (config.bazeliskCache.enabled || config.diskCache.enabled ||
|
||||
config.repositoryCache.enabled || config.externalCache.enabled) {
|
||||
core.addPath('C:\\Program Files\\Git\\usr\\bin')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function restoreExternalCaches (cacheConfig) {
|
||||
if (!cacheConfig.enabled) {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"author": "Alex Rodionov <p0deje@gmail.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "https://github.com/p0deje/toolkit/raw/119134874a4fac8906eaa42635597205de219a0b/packages/cache/actions-cache-3.1.1.tgz",
|
||||
"@actions/cache": "https://github.com/p0deje/toolkit/raw/730a2921638a36a31bb6bef6a70f34bff2c99aff/packages/cache/actions-cache-3.1.2.tgz",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/github": "^5.1.1",
|
||||
"@actions/glob": "^0.3.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue