mirror of
				https://github.com/Swatinem/rust-cache.git
				synced 2025-10-31 23:43:47 +00:00 
			
		
		
		
	
							parent
							
								
									2639a56bb8
								
							
						
					
					
						commit
						be44a3e6ff
					
				| @ -21,6 +21,9 @@ sensible defaults. | ||||
| : `key` | ||||
| An optional key that is added to the automatic cache key. | ||||
| 
 | ||||
| : `sharedKey` | ||||
| An additional key that is stable over multiple jobs. | ||||
| 
 | ||||
| : `working-directory` | ||||
| The working directory the action operates in, is case the cargo project is not | ||||
| located in the repo root. | ||||
|  | ||||
| @ -5,6 +5,9 @@ inputs: | ||||
|   key: | ||||
|     description: "An additional key for the cache" | ||||
|     required: false | ||||
|   sharedKey: | ||||
|     description: "An additional cache key that is stable over multiple jobs" | ||||
|     required: false | ||||
|   working-directory: | ||||
|     description: "The working directory this action should operate in" | ||||
|     required: false | ||||
|  | ||||
| @ -49,7 +49,11 @@ export async function getCacheConfig(): Promise<CacheConfig> { | ||||
| 
 | ||||
|   let key = `v0-rust-`; | ||||
| 
 | ||||
|   let inputKey = core.getInput("key"); | ||||
|   const sharedKey = core.getInput("sharedKey"); | ||||
|   if (sharedKey) { | ||||
|     key += `${sharedKey}-`; | ||||
|   } else { | ||||
|     const inputKey = core.getInput("key"); | ||||
|     if (inputKey) { | ||||
|       key += `${inputKey}-`; | ||||
|     } | ||||
| @ -58,6 +62,7 @@ export async function getCacheConfig(): Promise<CacheConfig> { | ||||
|     if (job) { | ||||
|       key += `${job}-`; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   key += await getRustKey(); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user