3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-10-24 17:44:35 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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) {