mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 07:38:37 +08:00 
			
		
		
		
	Call out caveats with cache exclude patterns
The pattern shown in the current README doesn't work as-is (see https://github.com/actions/cache/issues/494). Making it explicit in the README until fixed can save time for people trying to use the feature.
This commit is contained in:
		
							parent
							
								
									b32c91dfec
								
							
						
					
					
						commit
						3214fb2af7
					
				| 
						 | 
					@ -10,14 +10,14 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## What's New
 | 
					## What's New
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches. 
 | 
					* Added support for multiple paths, [glob patterns](https://github.com/actions/toolkit/tree/main/packages/glob), and single file caches (see [caveats on negative patterns](https://github.com/actions/cache/issues/494)). 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
- name: Cache multiple paths
 | 
					- name: Cache multiple paths
 | 
				
			||||||
  uses: actions/cache@v2
 | 
					  uses: actions/cache@v2
 | 
				
			||||||
  with:
 | 
					  with:
 | 
				
			||||||
    path: |
 | 
					    path: |
 | 
				
			||||||
      ~/cache
 | 
					      ~/cache/*
 | 
				
			||||||
      !~/cache/exclude
 | 
					      !~/cache/exclude
 | 
				
			||||||
    key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
 | 
					    key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user