mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Fix buildx caching
This commit is contained in:
16
.github/workflows/build_base_matrix_vod.yaml
vendored
16
.github/workflows/build_base_matrix_vod.yaml
vendored
@@ -7,6 +7,9 @@ on:
|
||||
branches:
|
||||
- vod
|
||||
|
||||
env:
|
||||
cachedir: /tmp/.buildx-cache-core-vod
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: [self-hosted]
|
||||
@@ -51,7 +54,7 @@ jobs:
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
path: ${{ env.cachedir }}
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
@@ -76,5 +79,12 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
cache-from: type=local,src=${{ env.cachedir }}
|
||||
cache-to: type=local,dest=${{ env.cachedir }}-new,mode=max
|
||||
- # Temp fix
|
||||
# https://github.com/docker/build-push-action/issues/252
|
||||
# https://github.com/moby/buildkit/issues/1896
|
||||
name: Move cache
|
||||
run: |
|
||||
rm -rf ${{ env.cachedir }}
|
||||
mv ${{ env.cachedir }}-new ${{ env.cachedir }}
|
||||
|
Reference in New Issue
Block a user