Skip to content

Commit e1e1bc4

Browse files
committed
fix: overwrite cache on GHA
1 parent 8007c65 commit e1e1bc4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
build_manylinux:
3232
name: ${{ matrix.policy }}_${{ matrix.platform }}
3333
runs-on: ubuntu-22.04
34+
permissions:
35+
actions: write # this permission is needed to delete cache
3436
strategy:
3537
fail-fast: false
3638
matrix:
@@ -70,6 +72,12 @@ jobs:
7072
- name: Build
7173
run: ./build.sh
7274

75+
- name: Delete cache
76+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
77+
run: |
78+
KEY="buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}"
79+
gh cache delete ${KEY} || true
80+
7381
- name: Save cache
7482
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7583
uses: actions/cache/save@v4

0 commit comments

Comments
 (0)