Skip to content

Commit 3794fea

Browse files
committed
chore: Try saving cache always
1 parent 2dda2a7 commit 3794fea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# NOTE: Ideally, the cache should be saved again after each job, but it is not working as expected. The error "Unable to reserve cache with key X. Another job may be creating this cache"
2121
# This produce that the cache is only saved the first time we push to the branch. Every consequent modification produces tasks to be re executed always.
2222
- name: Nx cache
23-
uses: actions/cache@v4
23+
uses: actions/cache/restore@v4
2424
with:
2525
path: .nx
2626
key: nx-cache-lint-${{ github.ref }}
@@ -35,6 +35,13 @@ jobs:
3535
- name: Lint
3636
if: github.event_name != 'pull_request'
3737
run: NX_REJECT_UNKNOWN_LOCAL_CACHE=0 pnpm nx run-many --target=lint --all
38+
- name: Save cache
39+
id: cache-primes-save
40+
if: always()
41+
uses: actions/cache/save@v4
42+
with:
43+
key: nx-cache-lint-${{ github.ref }}
44+
path: .nx
3845

3946
check-spell:
4047
name: Check spelling

0 commit comments

Comments
 (0)