Skip to content

Commit b0e5ac2

Browse files
GitHub: Cache node_modules per arch to avoid nx error (#70)
## Motivation for the change, related issues We are seeing 'local cache artifact... was not been generated on this machine' errors in GitHub Actions. It's not clear why we are seeing these errors, but let's make sure we are not using a node_modules cache generated on another architecture. Related to #69 ## Implementation details This PR makes `runner.arch` a component of the cached node_modules key in the prepare-playground action. ## Testing Instructions (or ideally a Blueprint) Let's rely on the CI workflow. If that completes without issue, let's merge this and then retry the website deployment workflow. Regardless of whether this change fixes the issue, I believe cached node_modules should only be used when their original runner.arch matches the current runner.arch because `npm install` can install different things depending on CPU architecture.
1 parent af2a6dd commit b0e5ac2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/prepare-playground/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
with:
2525
# caching node_modules
2626
path: node_modules
27-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
27+
key: ${{ runner.os }}-${{ runner.arch }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
2828
restore-keys: |
2929
${{ runner.os }}-build-${{ env.cache-name }}-
3030
${{ runner.os }}-build-

0 commit comments

Comments
 (0)