mirror of
				https://github.com/actions/cache.git
				synced 2025-11-01 02:44:18 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			928 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			928 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| export enum Inputs {
 | |
|     Key = "key", // Input for cache, restore, save action
 | |
|     Path = "path", // Input for cache, restore, save action
 | |
|     RestoreKeys = "restore-keys", // Input for cache, restore action
 | |
|     UploadChunkSize = "upload-chunk-size" // Input for cache, save action
 | |
| }
 | |
| 
 | |
| export enum Outputs {
 | |
|     CacheHit = "cache-hit", // Output from cache, restore action
 | |
|     CachePrimaryKey = "cache-primary-key", // Output from restore action
 | |
|     CacheRestoreKey = "cache-restore-key" // Output from restore action
 | |
| }
 | |
| 
 | |
| export enum State {
 | |
|     CachePrimaryKey = "CACHE_KEY",
 | |
|     CacheMatchedKey = "CACHE_RESULT"
 | |
| }
 | |
| 
 | |
| export enum Events {
 | |
|     Key = "GITHUB_EVENT_NAME",
 | |
|     Push = "push",
 | |
|     PullRequest = "pull_request"
 | |
| }
 | |
| 
 | |
| export const RefKey = "GITHUB_REF";
 | |
| 
 | |
| export const stateToOutputMap = new Map<string, string>([
 | |
|     [State.CacheMatchedKey, Outputs.CacheRestoreKey],
 | |
|     [State.CachePrimaryKey, Outputs.CachePrimaryKey]
 | |
| ]);
 | 
