/
action.yml
34 lines (31 loc) 路 976 Bytes
/
action.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
name: Yarn
description: Sets up the Yarn, the Yarn Cache, and installs
inputs:
cachix-auth-token:
required: true
description: "Your Cachix auth token."
runs:
using: composite
steps:
# Install Cachix
- uses: cachix/install-nix-action@v17
- name: Setup Cachix
uses: cachix/cachix-action@v10
with:
name: saber
authToken: ${{ inputs.cachix-auth-token }}
# Install Node
- uses: actions/setup-node@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
shell: nix shell .#ci --command bash {0}
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- run: yarn install
shell: nix shell .#ci --command bash {0}