fix(ci): stop caching node_modules in GitHub Actions

- cache only Bun's package cache so CI stops restoring partial hard-linked node_modules trees

- bump the cache key to avoid reusing corrupt node_modules archives on self-hosted runners
This commit is contained in:
Tam Nhu Tran
2026-04-20 13:23:42 -04:00
parent 399f403322
commit 1b3ca82a84
+9 -15
View File
@@ -40,16 +40,14 @@ jobs:
with:
node-version: '22'
- name: Restore bun + node_modules cache
- name: Restore bun package cache
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
ui/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
key: ${{ runner.os }}-bun-cache-v2-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-v2-
- name: Ensure dependencies
run: bash scripts/ensure-deps.sh
@@ -74,16 +72,14 @@ jobs:
with:
node-version: '22'
- name: Restore bun + node_modules cache
- name: Restore bun package cache
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
ui/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
key: ${{ runner.os }}-bun-cache-v2-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-v2-
- name: Ensure dependencies
run: bash scripts/ensure-deps.sh
@@ -117,16 +113,14 @@ jobs:
with:
node-version: '22'
- name: Restore bun + node_modules cache
- name: Restore bun package cache
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
ui/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
key: ${{ runner.os }}-bun-cache-v2-${{ hashFiles('bun.lock', 'ui/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-v2-
- name: Ensure dependencies
run: bash scripts/ensure-deps.sh