-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.3 KB
/
pull-request.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
name: Pull Request
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
branches:
- develop
# Saving Computation Time by Stopping Obsolete Workflows
concurrency:
group: ci-pr-${{ github.ref }}
cancel-in-progress: true
jobs:
deps-cache:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v3
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
name: Install dependencies
run: yarn install --frozen-lockfile
call-lint:
if: github.event.pull_request.draft == false
needs: [deps-cache]
uses: ./.github/workflows/_lint.yml
call-preview:
if: github.event.pull_request.draft == false
needs: [call-lint]
uses: ./.github/workflows/_preview-create.yml
secrets: inherit
call-cdk-diff:
if: github.event.pull_request.draft == false
needs: [call-lint]
uses: ./.github/workflows/_cdk.yml
with:
cdk_subcommand: diff
secrets: inherit