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:
parent
365406cb70
commit
5e66b6cac9
13 changed files with 951 additions and 449 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue