Add docker layer caching
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
		
							
								
								
									
										10
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -139,6 +139,14 @@ jobs: | ||||
|           # TODO: Remove driver-opts once fix is released docker/buildx#386 | ||||
|           driver-opts: image=moby/buildkit:master | ||||
|  | ||||
|       - name: Cache Docker layers | ||||
|         uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: /tmp/.buildx-cache | ||||
|           key: ${{ runner.os }}-buildx-${{ github.sha }} | ||||
|           restore-keys: | | ||||
|             ${{ runner.os }}-buildx- | ||||
|  | ||||
|       - name: Login to GitHub Container Registry | ||||
|         uses: docker/login-action@v1 | ||||
|         with: | ||||
| @@ -161,6 +169,8 @@ jobs: | ||||
|           platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||||
|           push: ${{ github.event_name == 'push' }} | ||||
|           tags: ${{ steps.tags.outputs.tags }} | ||||
|           cache-from: type=local,mode=max,src=/tmp/.buildx-cache | ||||
|           cache-to: type=local,mode=max,dest=/tmp/.buildx-cache | ||||
|           build-args: | | ||||
|             VERSION=${{ steps.tags.outputs.version }} | ||||
|             COMMIT_HASH=${{ steps.tags.outputs.commit_hash }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user