-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (70 loc) · 2.1 KB
/
workflows.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
# This workflow gathers the pipelines which will be executed on event bases.
name: workflows
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# build
build-prod:
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: ./.github/workflows/web-build.yaml
secrets: inherit
with:
runner: ubuntu-latest
# lint
linting:
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: ./.github/workflows/web-lint.yaml
secrets: inherit
with:
runner: ubuntu-latest
# unit-tests
tests:
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: ./.github/workflows/web-test.yaml
secrets: inherit
with:
runner: ubuntu-latest
# deploy docs
gh-pages:
if: |
contains(fromJSON('["push"]'), github.event_name) &&
contains(fromJSON('["main"]'), github.ref_name)
uses: ./.github/workflows/web-docs.yaml
secrets: inherit
with:
runner: ubuntu-latest
# deploy chromatic
chromatic:
needs: [build-prod, linting, tests]
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: ./.github/workflows/web-chromatic.yaml
secrets: inherit
with:
runner: ubuntu-latest
# scan security & license compliance
codeql:
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: ./.github/workflows/web-codeql.yaml
secrets: inherit
with:
runner: ubuntu-latest