Skip to content

Commit 9c939db

Browse files
committed
move cache to gha
1 parent db6491b commit 9c939db

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ jobs:
6161
- name: Setup Docker buildx
6262
uses: docker/setup-buildx-action@v3
6363

64-
- name: Docker cache - restore
65-
uses: actions/cache@v4
66-
with:
67-
path: /tmp/.buildx-cache
68-
key: buildx-${{ runner.os }}-${{ github.sha }}
69-
restore-keys: |
70-
buildx-${{ runner.os }}-
64+
# Avoid using local disk for buildx cache; use GHA cache backend
65+
- name: Prune Docker to free space
66+
run: |
67+
docker system prune -af --volumes || true
68+
rm -rf /tmp/.buildx-cache || true
69+
rm -rf ./out || true
7170
7271
# Build and export wheels directly (fastest method)
7372
- name: Build and export wheels
@@ -76,8 +75,8 @@ jobs:
7675
context: .
7776
target: wheels # We'll add this target to Dockerfile
7877
outputs: type=local,dest=./out
79-
cache-from: type=local,src=/tmp/.buildx-cache
80-
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
78+
cache-from: type=gha
79+
cache-to: type=gha,mode=max
8180

8281
- name: Verify exported wheels
8382
run: |

0 commit comments

Comments
 (0)