-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (64 loc) · 1.75 KB
/
ci-checks.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI checks
on:
- push
- pull_request
jobs:
Hadolint:
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile: ["docker-builds/base/Dockerfile"]
steps:
- uses: actions/checkout@v2
- uses: hadolint/[email protected]
with:
dockerfile: ${{ matrix.dockerfile }}
Prettier:
runs-on: ubuntu-latest
steps:
- name: Prettier Action
uses: creyD/[email protected]
Code_security:
name: Code security
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Scan project
uses: ShiftLeftSecurity/scan-action@master
nodejs-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["14"]
steps:
- uses: actions/checkout@v2
- name: Lint code using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: mkdir -p ~/.config/truffle/
- run: npm i -g yarn
- run: yarn deps
- run: yarn lint
docker_checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [ 'base' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build an image from Dockerfile
run: |
docker build -t ${{ matrix.image }}:${{ github.sha }} -f docker-builds/${{ matrix.image }}/Dockerfile .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ matrix.image }}:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'