Skip to content

Commit db9fb1f

Browse files
committed
Improve Docker cache handling
1 parent 79c556f commit db9fb1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
context: .
9090
file: ./Dockerfile
9191
cache-from: type=local,src=/tmp/.buildx-cache
92-
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
92+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
9393
load: true
9494
tags: ${{ steps.docker_meta.outputs.tags }}
9595
# Use runtime labels from docker_meta as well as fixed labels
@@ -109,3 +109,8 @@ jobs:
109109
- name: Push image
110110
if: ${{ github.event_name != 'pull_request' }}
111111
run: docker push ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
112+
113+
- name: Move cache
114+
run: |
115+
rm -rf /tmp/.buildx-cache
116+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

0 commit comments

Comments
 (0)