Skip to content

Commit a135fa0

Browse files
committed
ci: use buildjet/cache instead of actions/cache
1 parent 32dfa47 commit a135fa0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868

6969
- name: Restore cache
7070
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
71-
uses: actions/cache/restore@v4
71+
uses: buildjet/cache/restore@v4
7272
with:
7373
path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
7474
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
@@ -78,15 +78,13 @@ jobs:
7878

7979
- name: Delete cache
8080
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
81-
run: |
82-
KEY="buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}"
83-
gh cache delete ${KEY} || true
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
uses: buildjet/cache-delete@v1
82+
with:
83+
cache_key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
8684

8785
- name: Save cache
8886
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
89-
uses: actions/cache/save@v4
87+
uses: buildjet/cache/save@v4
9088
with:
9189
path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
9290
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}

0 commit comments

Comments
 (0)