mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 03:04:01 +00:00 
			
		
		
		
	Make 'update' optional
This commit is contained in:
		
							parent
							
								
									d5f1550948
								
							
						
					
					
						commit
						82f8348041
					
				@ -13,13 +13,15 @@ interface CacheInput {
 | 
				
			|||||||
    path: string;
 | 
					    path: string;
 | 
				
			||||||
    key: string;
 | 
					    key: string;
 | 
				
			||||||
    restoreKeys?: string[];
 | 
					    restoreKeys?: string[];
 | 
				
			||||||
    update: string;
 | 
					    update?: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function setInputs(input: CacheInput): void {
 | 
					export function setInputs(input: CacheInput): void {
 | 
				
			||||||
    setInput(Inputs.Path, input.path);
 | 
					    setInput(Inputs.Path, input.path);
 | 
				
			||||||
    setInput(Inputs.Key, input.key);
 | 
					    setInput(Inputs.Key, input.key);
 | 
				
			||||||
    setInput(Inputs.Update, input.update);
 | 
					    input.update
 | 
				
			||||||
 | 
					        ? setInput(Inputs.Update, input.update)
 | 
				
			||||||
 | 
					        : setInput(Inputs.Update, "false");
 | 
				
			||||||
    input.restoreKeys &&
 | 
					    input.restoreKeys &&
 | 
				
			||||||
        setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
 | 
					        setInput(Inputs.RestoreKeys, input.restoreKeys.join("\n"));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user