-
Notifications
You must be signed in to change notification settings - Fork 1.4k
48 lines (44 loc) · 1.04 KB
/
cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Cache
on:
push:
branches:
- main
- pre-release-testing-branch
- changeset-release/main
- v-next
paths:
- ".github/workflows/cache.yml"
- "**/pnpm-lock.yaml"
pull_request:
paths:
- ".github/workflows/cache.yml"
- "**/pnpm-lock.yaml"
workflow_dispatch:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
cache:
name: Cache
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
- id: env
uses: ./.github/actions/setup-env
with:
cache-save: true
- name: Install
if: steps.env.outputs.cache-hit != 'true'
run: |
for lockfile in $(find "$(pwd)" -name pnpm-lock.yaml); do
pushd "$(dirname "$lockfile")"
pnpm install --frozen-lockfile --prefer-offline
popd
done