|
1
|
name: cache-deps |
|
2
|
description: Creates a cache with the given extension for monorepo dependencies |
|
3
|
inputs: |
|
4
|
extension: |
|
5
|
description: Extension for cache name |
|
6
|
skip-build: |
|
7
|
description: Skip build step (default false) |
|
8
|
default: "false" |
|
9
|
runs: |
|
10
|
using: composite |
|
11
|
steps: |
|
12
|
- uses: actions/cache@v4 |
|
13
|
id: cache |
|
14
|
with: |
|
15
|
path: | |
|
16
|
.yarn/cache |
|
17
|
node_modules |
|
18
|
.pnp.* |
|
19
|
key: ${{ runner.os }}-yarn-${{inputs.extension}}-v8-${{ hashFiles('**/yarn.lock') }}-3 |
|
20
|
restore-keys: | |
|
21
|
${{ runner.os }}-yarn-${{inputs.extension}}-v8-3 |
|
22
|
# We want to only bootstrap and install if no cache is found. |
|
23
|
- run: yarn install --immutable --inline-builds |
|
24
|
shell: bash |
|
25
|
if: steps.cache.outputs.cache-hit != 'true' |
|
26
|
|
|
27
|
- run: yarn build |
|
28
|
shell: bash |
|
29
|
if: ${{ inputs.skip-build != 'true' }} |