-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change yarn caching in GitHub Actions to allow partial caching
Previously it was all or nothing, so a single change will have to re-download everything. Now it works the same as local, only downloading the one new package.
- Loading branch information
1 parent
ec0b904
commit 1bc67d5
Showing
2 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Node Setup & Yarn Install | ||
description: 'Setup Node.js and install dependencies with Yarn' | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .yarn/cache | ||
key: yarn-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: yarn-cache- | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: yarn install | ||
env: | ||
# Use the local cache folder, so we can cache it above | ||
YARN_ENABLE_GLOBAL_CACHE: 'false' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters