mirror of
https://github.com/actions/cache.git
synced 2026-04-05 22:36:56 +00:00
feat: Introduced restore-only flag
This commit is contained in:
parent
668228422a
commit
e58227cd44
10 changed files with 63 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ interface CacheInput {
|
|||
enableCrossOsArchive?: boolean;
|
||||
failOnCacheMiss?: boolean;
|
||||
lookupOnly?: boolean;
|
||||
restoreOnly?: boolean;
|
||||
}
|
||||
|
||||
export function setInputs(input: CacheInput): void {
|
||||
|
|
@ -32,6 +33,8 @@ export function setInputs(input: CacheInput): void {
|
|||
setInput(Inputs.FailOnCacheMiss, input.failOnCacheMiss.toString());
|
||||
input.lookupOnly !== undefined &&
|
||||
setInput(Inputs.LookupOnly, input.lookupOnly.toString());
|
||||
input.restoreOnly !== undefined &&
|
||||
setInput(Inputs.RestoreOnly, input.restoreOnly.toString());
|
||||
}
|
||||
|
||||
export function clearInputs(): void {
|
||||
|
|
@ -42,4 +45,5 @@ export function clearInputs(): void {
|
|||
delete process.env[getInputName(Inputs.EnableCrossOsArchive)];
|
||||
delete process.env[getInputName(Inputs.FailOnCacheMiss)];
|
||||
delete process.env[getInputName(Inputs.LookupOnly)];
|
||||
delete process.env[getInputName(Inputs.RestoreOnly)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue