forked from mystiq/dex
Add docker layer caching
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
5cc8b562ec
commit
10ac93d42b
1 changed files with 10 additions and 0 deletions
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
|
# TODO: Remove driver-opts once fix is released docker/buildx#386
|
||||||
driver-opts: image=moby/buildkit:master
|
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
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -161,6 +169,8 @@ jobs:
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
push: ${{ github.event_name == 'push' }}
|
push: ${{ github.event_name == 'push' }}
|
||||||
tags: ${{ steps.tags.outputs.tags }}
|
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: |
|
build-args: |
|
||||||
VERSION=${{ steps.tags.outputs.version }}
|
VERSION=${{ steps.tags.outputs.version }}
|
||||||
COMMIT_HASH=${{ steps.tags.outputs.commit_hash }}
|
COMMIT_HASH=${{ steps.tags.outputs.commit_hash }}
|
||||||
|
|
Loading…
Reference in a new issue