-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (84 loc) · 2.73 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# 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: DicoAuto/actions/.github/workflows/web-build.yaml@development
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: DicoAuto/actions/.github/workflows/web-lint.yaml@development
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: DicoAuto/actions/.github/workflows/web-test.yaml@development
secrets: inherit
with:
runner: ubuntu-latest
# sonarqube
sonarqube:
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: DicoAuto/actions/.github/workflows/web-sonarqube.yaml@development
secrets: inherit
with:
ref_branch: 'main'
verbose: false
runner: ubuntu-latest
# deploy docs
gh-pages:
if: |
contains(fromJSON('["push"]'), github.event_name) &&
contains(fromJSON('["main"]'), github.ref_name)
uses: DicoAuto/actions/.github/workflows/web-docs.yaml@development
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: DicoAuto/actions/.github/workflows/web-chromatic.yaml@development
secrets: inherit
with:
runner: ubuntu-latest
# scan security & license compliance
blackduck:
if: |
contains(fromJSON('["push", "pull_request"]'), github.event_name) ||
(contains(fromJSON('["main"]'), github.base_ref) ||
contains(fromJSON('["main"]'), github.ref_name))
uses: DicoAuto/actions/.github/workflows/web-blackduck.yaml@development
secrets: inherit
with:
version_file: package.json
runner: ubuntu-latest