mirror of
https://github.com/actions/cache.git
synced 2025-06-18 23:02:57 -06:00
Add support to opt-in enable cross-os caching on windows
This commit is contained in:
parent
365406cb70
commit
5e66b6cac9
13 changed files with 951 additions and 449 deletions
|
@ -19,8 +19,7 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
|
|||
|
||||
if (!utils.isValidEvent()) {
|
||||
utils.logWarning(
|
||||
`Event Validation Error: The event type ${
|
||||
process.env[Events.Key]
|
||||
`Event Validation Error: The event type ${process.env[Events.Key]
|
||||
} is not supported because it's not tied to a branch or tag ref.`
|
||||
);
|
||||
return;
|
||||
|
@ -52,9 +51,14 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
|
|||
required: true
|
||||
});
|
||||
|
||||
cacheId = await cache.saveCache(cachePaths, primaryKey, {
|
||||
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
||||
});
|
||||
const enableCrossOsArchive = utils.getInputAsBool(Inputs.EnableCrossOsArchive);
|
||||
|
||||
cacheId = await cache.saveCache(
|
||||
cachePaths,
|
||||
primaryKey,
|
||||
{ uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize) },
|
||||
enableCrossOsArchive
|
||||
);
|
||||
|
||||
if (cacheId != -1) {
|
||||
core.info(`Cache saved with key: ${primaryKey}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue