mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-20 15:53:59 +08:00
Add initial eslint setup (#88)
This commit is contained in:
parent
31508256ff
commit
fb50aa45ec
12 changed files with 1044 additions and 91 deletions
|
@ -5,7 +5,7 @@ function getInputName(name: string): string {
|
|||
return `INPUT_${name.replace(/ /g, "_").toUpperCase()}`;
|
||||
}
|
||||
|
||||
export function setInput(name: string, value: string) {
|
||||
export function setInput(name: string, value: string): void {
|
||||
process.env[getInputName(name)] = value;
|
||||
}
|
||||
|
||||
|
@ -15,14 +15,14 @@ interface CacheInput {
|
|||
restoreKeys?: string[];
|
||||
}
|
||||
|
||||
export function setInputs(input: CacheInput) {
|
||||
export function setInputs(input: CacheInput): void {
|
||||
setInput(Inputs.Path, input.path);
|
||||
setInput(Inputs.Key, input.key);
|
||||
input.restoreKeys &&
|
||||
setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
|
||||
}
|
||||
|
||||
export function clearInputs() {
|
||||
export function clearInputs(): void {
|
||||
delete process.env[getInputName(Inputs.Path)];
|
||||
delete process.env[getInputName(Inputs.Key)];
|
||||
delete process.env[getInputName(Inputs.RestoreKeys)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue