mirror of
				https://git.mirrors.martin98.com/https://github.com/actions/cache
				synced 2025-10-31 14:51:09 +08:00 
			
		
		
		
	Update Node Windows example to find the npm cache (#223)
This commit is contained in:
		
							parent
							
								
									b13df3fa54
								
							
						
					
					
						commit
						22d71e33ad
					
				| @ -140,10 +140,14 @@ For npm, cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` o | ||||
| ### Windows | ||||
| 
 | ||||
| ```yaml | ||||
| - name: Get npm cache directory | ||||
|   id: npm-cache | ||||
|   run: | | ||||
|     echo "::set-output name=dir::$(npm config get cache)" | ||||
| - uses: actions/cache@v1 | ||||
|   with: | ||||
|     path: ~\AppData\Roaming\npm-cache | ||||
|     key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }} | ||||
|     path: ${{ steps.npm-cache.outputs.dir }} | ||||
|     key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-node- | ||||
| ``` | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dylan Musil
						Dylan Musil