mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 07:38:37 +08:00 
			
		
		
		
	Cache all non missing layers
This commit is contained in:
		
							parent
							
								
									6c1be59bbc
								
							
						
					
					
						commit
						6667986807
					
				| 
						 | 
					@ -180,7 +180,7 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
 | 
				
			||||||
  if: steps.cache.outputs.cache-hit != 'true'
 | 
					  if: steps.cache.outputs.cache-hit != 'true'
 | 
				
			||||||
  run: |
 | 
					  run: |
 | 
				
			||||||
    docker build --cache-from my-image -t my-image .
 | 
					    docker build --cache-from my-image -t my-image .
 | 
				
			||||||
    docker save my-image > my-image.tar
 | 
					    docker save my-image $(docker history -q my-image | awk '!/<missing>/{print}') > my-image.tar
 | 
				
			||||||
    mkdir docker-cache
 | 
					    mkdir docker-cache
 | 
				
			||||||
    split -b 100m my-image.tar docker-cache/x
 | 
					    split -b 100m my-image.tar docker-cache/x
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user