mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 20:32:35 +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:
|
branches:
|
||||||
- vod
|
- vod
|
||||||
|
|
||||||
|
env:
|
||||||
|
cachedir: /tmp/.buildx-cache-core-vod
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: [self-hosted]
|
runs-on: [self-hosted]
|
||||||
@@ -51,7 +54,7 @@ jobs:
|
|||||||
- name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: ${{ env.cachedir }}
|
||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
@@ -76,5 +79,12 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=${{ env.cachedir }}
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
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