mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 10:14:02 +00:00 
			
		
		
		
	Merge 21a5693e300204ad6e07de227694f0e8e2db2ed8 into c64c572235d810460d0d6876e9c705ad5002b353
This commit is contained in:
		
						commit
						52fa74d3ea
					
				
							
								
								
									
										17
									
								
								examples.md
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								examples.md
									
									
									
									
									
								
							@ -414,7 +414,20 @@ Locations:
 | 
			
		||||
 - macOS: `~/Library/Application Support/renv`
 | 
			
		||||
 - Windows: `%LOCALAPPDATA%/renv`
 | 
			
		||||
 | 
			
		||||
### Simple example
 | 
			
		||||
 | 
			
		||||
### Using variables to specify location
 | 
			
		||||
 | 
			
		||||
(Appropriate for single or multiple operating systems.)
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
 - uses: actions/cache@v2
 | 
			
		||||
   with:
 | 
			
		||||
     path: ${{ env.R_LIBS_USER }}
 | 
			
		||||
     key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
 | 
			
		||||
     restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Simple example with hard-coded path
 | 
			
		||||
```yaml
 | 
			
		||||
- uses: actions/cache@v2
 | 
			
		||||
  with:
 | 
			
		||||
@ -426,7 +439,7 @@ Locations:
 | 
			
		||||
 | 
			
		||||
Replace `~/.local/share/renv` with the correct `path` if not using Ubuntu.
 | 
			
		||||
 | 
			
		||||
### Multiple OS's in a workflow
 | 
			
		||||
### Multiple OSs in a workflow
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
- uses: actions/cache@v2
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user