1
0
mirror of https://github.com/actions/cache.git synced 2025-12-27 09:58:59 +08:00

Add support to opt-in enable cross-os caching on windows

This commit is contained in:
Sampark Sharma
2023-01-04 07:54:25 +00:00
committed by GitHub
parent 365406cb70
commit 5e66b6cac9
13 changed files with 951 additions and 449 deletions

View File

@@ -17,8 +17,7 @@ async function restoreImpl(
// Validate inputs, this can cause task failure
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;
@@ -31,11 +30,14 @@ async function restoreImpl(
const cachePaths = utils.getInputAsArray(Inputs.Path, {
required: true
});
const enableCrossOsArchive = utils.getInputAsBool(Inputs.EnableCrossOsArchive);
const cacheKey = await cache.restoreCache(
cachePaths,
primaryKey,
restoreKeys
restoreKeys,
{},
enableCrossOsArchive
);
if (!cacheKey) {