mirror of
https://github.com/actions/cache.git
synced 2025-04-22 12:06:45 +00:00
Add support to opt-in enable cross-os caching on windows (#1056)
* Add support to opt-in enable cross-os caching on windows * Fix tests * Address review comments and update tests * Fix tests * Address review comments * Address review comments
This commit is contained in:
parent
1f414295fe
commit
6fd2d4538c
22 changed files with 1172 additions and 496 deletions
|
@ -13,6 +13,7 @@ interface CacheInput {
|
|||
path: string;
|
||||
key: string;
|
||||
restoreKeys?: string[];
|
||||
enableCrossOsArchive?: boolean;
|
||||
}
|
||||
|
||||
export function setInputs(input: CacheInput): void {
|
||||
|
@ -20,6 +21,11 @@ export function setInputs(input: CacheInput): void {
|
|||
setInput(Inputs.Key, input.key);
|
||||
input.restoreKeys &&
|
||||
setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
|
||||
input.enableCrossOsArchive !== undefined &&
|
||||
setInput(
|
||||
Inputs.EnableCrossOsArchive,
|
||||
input.enableCrossOsArchive.toString()
|
||||
);
|
||||
}
|
||||
|
||||
export function clearInputs(): void {
|
||||
|
@ -27,4 +33,5 @@ export function clearInputs(): void {
|
|||
delete process.env[getInputName(Inputs.Key)];
|
||||
delete process.env[getInputName(Inputs.RestoreKeys)];
|
||||
delete process.env[getInputName(Inputs.UploadChunkSize)];
|
||||
delete process.env[getInputName(Inputs.EnableCrossOsArchive)];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue