-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.15 KB
/
ci-cobuild.yml
File metadata and controls
64 lines (56 loc) · 2.15 KB
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
name: ci-cobuild.yml
on:
#push:
# branches: ['main']
#pull_request:
# branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: cobuild
runs-on: ubuntu-latest
strategy:
matrix:
runner_id: [runner1, runner2, runner3]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Git config user
run: |
git config --local user.name "Rushbot"
git config --local user.email "rushbot@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore PNPM from GHA cache
id: pnpm-cache-restore
uses: actions/cache/restore@v3
with:
path: ~/.rush-pnpm-store
key: v1003-pnpm-${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
# If we can't find a match, restore the latest cache entry
restore-keys: |
v1003-pnpm-${{ runner.os }}-
- name: Set RUSH_PNPM_STORE_PATH
run: echo "RUSH_PNPM_STORE_PATH=~/.rush-pnpm-store" >> $GITHUB_ENV
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Save PNPM to GHA cache
if: steps.pnpm-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ~/.rush-pnpm-store
key: v1003-pnpm-${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
- name: Rush build (install-run-rush)
run: node common/scripts/install-run-rush.js build --verbose --production --timeline
env:
# Prevent time-based browserslist update warning
# See https://github.com/microsoft/rushstack/issues/2981
BROWSERSLIST_IGNORE_OLD_DATA: 1
RUSH_BUILD_CACHE_WRITE_ALLOWED: 1
RUSH_BUILD_CACHE_CREDENTIAL: ${{ secrets.RUSH_BUILD_CACHE_CREDENTIAL }}
RUSH_COBUILD_CONTEXT_ID: ${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}
RUSH_COBUILD_RUNNER_ID: ${{ matrix.runner_id }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}