-
Notifications
You must be signed in to change notification settings - Fork 401
/
action.yml
66 lines (58 loc) 路 2.18 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# For more information see:
# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
# - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_id
# The action can be referenced in workflows like:
# - ngxs/store/.github/actions/setup@master
# - ./.github/actions/setup
name: setup
description: Set up environment
inputs:
node-version:
description: Node version
required: true
default: 18.x
github-ref-name:
description: Branch name
required: true
default: ${{ github.ref_name }}
github-sha:
description: Commit hash
required: true
default: ${{ github.sha }}
runs:
using: 'composite'
steps:
- name: Don't save Bash session history
shell: bash
run: unset HISTFILE
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: https://registry.npmjs.org
check-latest: true
- name: Configure kernel (increase watchers)
shell: bash
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Workspace cache
uses: actions/cache@v3
id: workspace-cache
env:
cache-name: workspace-cache
with:
path: |
~/.cache
./node_modules
./@ngxs
./integrations/hello-world-ng16/dist-integration
./integrations/hello-world-ng17/dist-integration
./integrations/hello-world-ng18/dist-integration
key: ${{ runner.os }}-node-${{ inputs.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}-branch-${{ inputs.github-ref-name }}-sha-${{ inputs.github-sha }}
restore-keys: |
${{ runner.os }}-node-${{ inputs.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}-branch-${{ inputs.github-ref-name }}-sha-
${{ runner.os }}-node-${{ inputs.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}-branch-
${{ runner.os }}-node-${{ inputs.node-version }}-yarn-
${{ runner.os }}-
- name: Install project dependencies
shell: bash
run: yarn install --frozen-lockfile --non-interactive