diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a837edf2..46f761a8 100644 --- a/.github/workflows/ci.yml +++ b/.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 }}