mirror of
https://github.com/actions/cache.git
synced 2025-06-30 21:14:14 +00:00
add support for read-only cache
This commit is contained in:
parent
6babf202a4
commit
a88d0603fe
8 changed files with 79 additions and 3 deletions
|
@ -13,6 +13,7 @@ interface CacheInput {
|
|||
path: string;
|
||||
key: string;
|
||||
restoreKeys?: string[];
|
||||
readOnly?: boolean;
|
||||
}
|
||||
|
||||
export function setInputs(input: CacheInput): void {
|
||||
|
@ -20,6 +21,7 @@ export function setInputs(input: CacheInput): void {
|
|||
setInput(Inputs.Key, input.key);
|
||||
input.restoreKeys &&
|
||||
setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
|
||||
input.readOnly && setInput(Inputs.ReadOnly, "true");
|
||||
}
|
||||
|
||||
export function clearInputs(): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue