mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 15:48:39 +08:00 
			
		
		
		
	Cache downloaded cache insted of virtualenv
This commit is contained in:
		
							parent
							
								
									643f38f49f
								
							
						
					
					
						commit
						315c827b9b
					
				| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
- [Ruby - Gem](#ruby---gem)
 | 
			
		||||
- [Go - Modules](#go---modules)
 | 
			
		||||
- [Elixir - Mix](#elixir---mix)
 | 
			
		||||
- [Python - pip, virtualenv](#python---pip-virtualenv)
 | 
			
		||||
- [Python - pip](#python---pip)
 | 
			
		||||
 | 
			
		||||
## Node - npm
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -121,14 +121,12 @@ uses: actions/cache@preview
 | 
			
		|||
      ${{ runner.os }}-mix-
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Python - pip, virtualenv
 | 
			
		||||
 | 
			
		||||
If caching the virtualenv, you have to activate the environment for each tasks.
 | 
			
		||||
## Python - pip
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
- uses: actions/cache@preview
 | 
			
		||||
  with:
 | 
			
		||||
    path: .venv
 | 
			
		||||
    path: ~/.cache/pip
 | 
			
		||||
    key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
 | 
			
		||||
    restore-keys: |
 | 
			
		||||
      ${{ runner.os }}-pip-
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user