Skip to content

Commit a8a9358

Browse files
committed
Fix actionlint error
1 parent 208322a commit a8a9358

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,17 +363,25 @@ jobs:
363363
- name: zizmor
364364
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
365365

366-
- name: Cache prek
367-
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
366+
- name: restore prek cache
367+
if: ${{ github.ref != 'refs/heads/main' }} # never restore on main
368+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
368369
with:
369-
path: ~/.cache/prek
370370
key: prek-${{ hashFiles('.pre-commit-config.yaml') }}
371+
path: ~/.cache/prek
371372

372373
- name: prek
373374
uses: j178/prek-action@79f765515bd648eb4d6bb1b17277b7cb22cb6468 # v2.0.0
374375
with:
375376
cache: false
376377

378+
- name: save prek cache
379+
if: ${{ github.ref == 'refs/heads/main' }} # only save on main
380+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
381+
with:
382+
key: prek-${{ hashFiles('.pre-commit-config.yaml') }}
383+
path: ~/.cache/prek
384+
377385
- name: reviewdog
378386
if: failure()
379387
uses: reviewdog/action-suggester@aa38384ceb608d00f84b4690cacc83a5aba307ff # 1.24.0

0 commit comments

Comments
 (0)