-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (47 loc) · 1.26 KB
/
call-build.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
name: Build
on:
workflow_call:
secrets:
IMPACTED_BY_SHA:
required: true
jobs:
build:
name: build
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: check out code base
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check out code base
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ secrets.IMPACTED_BY_SHA }}
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: '8.13.1'
- name: setup Node
uses: actions/setup-node@v4
with:
node-version: '18.18.0'
cache: 'pnpm'
- name: cache nx
id: cache
uses: actions/[email protected]
with:
path: common/temp
key: ${{ runner.os }}-build-branch-${{ hashFiles('.nx/lockfile.hash') }}
restore-keys: |
${{ runner.os }}-build-pr-
${{ runner.os }}-build-
${{ runner.os }}-
- name: pnpm install
# if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install
- name: projects build
run: pnpm nx run-many -t build --all