Browse Source

Add docker layer caching

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
pull/1856/head
Mark Sagi-Kazar 5 years ago
parent
commit
10ac93d42b
No known key found for this signature in database
GPG Key ID: 34CC109EB5ED1C2A
  1. 10
      .github/workflows/ci.yml

10
.github/workflows/ci.yml

@ -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 }}

Loading…
Cancel
Save