mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-30 07:16:04 +08:00
Simplify Docker layer caching
This commit is contained in:
parent
5213b732b9
commit
2dfb2b143d
1 changed files with 2 additions and 16 deletions
18
.github/workflows/deploy.yaml
vendored
18
.github/workflows/deploy.yaml
vendored
|
|
@ -79,13 +79,6 @@ jobs:
|
|||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=edge,branch=main
|
||||
- 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: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
|
|
@ -93,12 +86,5 @@ jobs:
|
|||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# TODO: switch to type=gha once available:
|
||||
# * pending PR: https://github.com/moby/buildkit/pull/1974
|
||||
# * context: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue