Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit 832bbfa

Browse files
author
Joonas Koivunen
committed
ci: skip npm caching for cross builds, cache key
the cross builders might end up otherwise poisoning the cache with an empty npm. this may have already happened and explains why it didn't work for mac and linux. also include the patches again in the cache key.
1 parent 9ec7583 commit 832bbfa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ jobs:
7272

7373
- name: Get npm cache directory
7474
id: npm-cache
75+
if: matrix.platform.cross == false
7576
run: |
7677
echo "::set-output name=dir::$(npm config get cache)"
7778
78-
- name: Cache npm
79+
- name: Cache npm (non-cross targets)
7980
uses: actions/cache@v2
81+
if: matrix.platform.cross == false
8082
with:
8183
path: ${{ steps.npm-cache.outputs.dir }}
82-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/setup.sh') }}
84+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/setup.sh', '**/*.patch') }}
8385
restore-keys: |
8486
${{ runner.os }}-node-
8587

0 commit comments

Comments
 (0)