-
Notifications
You must be signed in to change notification settings - Fork 1
177 lines (175 loc) · 5.57 KB
/
check.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Check
on:
pull_request: ~
push:
branches:
- main
- v0
permissions: read-all
jobs:
audit:
name: Audit
uses: ericcornelissen/js-regex-security-scanner/.github/workflows/reusable-audit.yml@main
needs:
- build
build:
name: Build with ${{ matrix.engine }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
engine:
- docker
- podman
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
github.com:443
nodejs.org:443
objects.githubusercontent.com:443
production.cloudflare.docker.com:443
registry-1.docker.io:443
registry.npmjs.org:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Build
env:
ENGINE: ${{ matrix.engine }}
run: make build "ENGINE=$ENGINE"
licenses:
name: Licenses
runs-on: ubuntu-22.04
needs:
- build
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
artifactcache.actions.githubusercontent.com:443
auth.docker.io:443
files.pythonhosted.org:443
fulcio.sigstore.dev:443
github.com:443
gitlab.com:443
nodejs.org:443
objects.githubusercontent.com:443
production.cloudflare.docker.com:443
pypi.org:443
registry-1.docker.io:443
registry.npmjs.org:443
rekor.sigstore.dev:443
sigstore-tuf-root.storage.googleapis.com:443
toolbox-data.anchore.io:443
tuf-repo-cdn.sigstore.dev:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: npm
node-version-file: .nvmrc
- name: Install tooling
uses: asdf-vm/actions/install@4f8f7939dd917fc656bb7c3575969a5988c28364 # v3.0.0
- name: Check container image licenses
if: ${{ failure() || success() }}
run: make license-check-image
- name: Check npm licenses
if: ${{ failure() || success() }}
run: make license-check-npm
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
artifactcache.actions.githubusercontent.com:443
files.pythonhosted.org:443
fulcio.sigstore.dev:443
github.com:443
gitlab.com:443
nodejs.org:443
objects.githubusercontent.com:443
pypi.org:443
registry.npmjs.org:443
rekor.sigstore.dev:443
sigstore-tuf-root.storage.googleapis.com:443
tuf-repo-cdn.sigstore.dev:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: npm
node-version-file: .nvmrc
- name: Install tooling
uses: asdf-vm/actions/install@4f8f7939dd917fc656bb7c3575969a5988c28364 # v3.0.0
- name: Lint CI
if: ${{ failure() || success() }}
run: make lint-ci
- name: Lint Containerfile
if: ${{ failure() || success() }}
run: make lint-image
- name: Lint JavaScript
if: ${{ failure() || success() }}
run: make lint-js
- name: Lint MarkDown
if: ${{ failure() || success() }}
run: make lint-md
- name: Lint YAML
if: ${{ failure() || success() }}
run: make lint-yml
test:
name: Test with ${{ matrix.engine }}
runs-on: ubuntu-22.04
needs:
- build
strategy:
fail-fast: false
matrix:
engine:
- docker
- podman
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
artifactcache.actions.githubusercontent.com:443
auth.docker.io:443
github.com:443
nodejs.org:443
objects.githubusercontent.com:443
production.cloudflare.docker.com:443
registry-1.docker.io:443
registry.npmjs.org:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
submodules: true
- name: Install Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: npm
node-version-file: .nvmrc
- name: Test
env:
ENGINE: ${{ matrix.engine }}
run: make test "ENGINE=$ENGINE"