mirror of
				https://github.com/Swatinem/rust-cache
				synced 2025-10-30 20:32:27 +00:00 
			
		
		
		
	add description
This commit is contained in:
		
							parent
							
								
									f82d41bcc2
								
							
						
					
					
						commit
						3b8bbcb11d
					
				
					 2 changed files with 9 additions and 4 deletions
				
			
		|  | @ -11,9 +11,12 @@ inputs: | |||
|   working-directory: | ||||
|     description: "The working directory this action should operate in" | ||||
|     required: false | ||||
|   target-dir: | ||||
|     description: "The target dir that should be cleaned and persisted, defaults to `./target`" | ||||
|     required: false | ||||
| outputs: | ||||
|   cache-hit: | ||||
|     description: 'A boolean value that indicates an exact match was found' | ||||
|     description: "A boolean value that indicates an exact match was found" | ||||
| runs: | ||||
|   using: "node12" | ||||
|   main: "dist/restore/index.js" | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ process.on("uncaughtException", (e) => { | |||
| }); | ||||
| 
 | ||||
| const cwd = core.getInput("working-directory"); | ||||
| //todo: this could be read from .cargo config file directly
 | ||||
| // TODO: this could be read from .cargo config file directly
 | ||||
| const targetDir = core.getInput("target-dir") || "./target"; | ||||
| if (cwd) { | ||||
|   process.chdir(cwd); | ||||
|  | @ -29,7 +29,7 @@ export const paths = { | |||
|   index: path.join(cargoHome, "registry/index"), | ||||
|   cache: path.join(cargoHome, "registry/cache"), | ||||
|   git: path.join(cargoHome, "git"), | ||||
|   target: "target", | ||||
|   target: targetDir, | ||||
| }; | ||||
| 
 | ||||
| interface CacheConfig { | ||||
|  | @ -138,7 +138,9 @@ export async function getCmdOutput( | |||
| } | ||||
| 
 | ||||
| async function getLockfileHash(): Promise<string> { | ||||
|   const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", { followSymbolicLinks: false }); | ||||
|   const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", { | ||||
|     followSymbolicLinks: false, | ||||
|   }); | ||||
|   const files = await globber.glob(); | ||||
|   files.sort((a, b) => a.localeCompare(b)); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue