-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add build cache to packages workflow
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
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,27 @@ | ||
name: Setup Cache | ||
description: Prepare Snack's build cache in GitHub Actions | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: ♻️ Find modules cache | ||
id: modules-cache | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: ♻️ Restore modules cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.modules-cache.outputs.dir }} | ||
key: yarn-TEST_1-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn-TEST_1-${{ runner.os }}- | ||
- name: ♻️ Restore build cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: turbo-TEST_3-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: | | ||
turbo-TEST_3-${{ runner.os }}- | ||
path: | | ||
node_modules/.cache/turbo | ||
packages/*/.turbo |
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