14
14
15
15
name : Build and push OADA images
16
16
17
+ permissions :
18
+ packages : write
19
+ security-events : write
20
+ id-token : write
21
+ actions : read
22
+ checks : read
23
+ contents : read
24
+ deployments : read
25
+ issues : read
26
+ discussions : read
27
+ pages : read
28
+ pull-requests : read
29
+ repository-projects : read
30
+ statuses : read
31
+
17
32
on :
18
33
push :
19
34
pull_request :
40
55
id : services
41
56
run : |
42
57
SERVICES=$(ls -1 oada/services | tr '\n' ',' | sed 's/,/","/g' | sed 's/^/["/' | sed 's/,"$/]/')
43
- echo ::set-output name= list:: ${SERVICES}
58
+ echo list=" ${SERVICES}" >> "$GITHUB_OUTPUT"
44
59
45
60
- name : Parse Ref
46
61
id : ref
78
93
exit 1
79
94
fi
80
95
81
- echo ::set-output name= version:: ${VERSION}
82
- echo ::set-output name= release:: ${RELEASE}
96
+ echo version=" ${VERSION}" >> "$GITHUB_OUTPUT"
97
+ echo release=" ${RELEASE}" >> "$GITHUB_OUTPUT"
83
98
84
99
- name : Parse Semver
85
100
id : semver
@@ -111,7 +126,6 @@ jobs:
111
126
version : latest
112
127
113
128
- name : Cache docker layers
114
- if : ${{ !env.ACT }} # Awaiting ACT version after 0.2.17 for this feature
115
129
uses : actions/cache@v4
116
130
id : cache
117
131
with :
@@ -175,7 +189,6 @@ jobs:
175
189
version : latest
176
190
177
191
- name : Cache docker layers
178
- if : ${{ !env.ACT }} # Awaiting ACT version after 0.2.17 for this feature
179
192
uses : actions/cache@v4
180
193
id : cache
181
194
with :
@@ -195,8 +208,8 @@ jobs:
195
208
# Name on GHCR
196
209
GHCR_IMAGE=ghcr.io/${OWNER}/${{ matrix.service}}
197
210
198
- echo ::set-output name= dockerhub:: ${DOCKER_IMAGE}
199
- echo ::set-output name= ghcr:: ${GHCR_IMAGE}
211
+ echo dockerhub=" ${DOCKER_IMAGE}" >> "$GITHUB_OUTPUT"
212
+ echo ghcr=" ${GHCR_IMAGE}" >> "$GITHUB_OUTPUT"
200
213
201
214
- name : Login to DockerHub
202
215
# if: github.event_name != 'pull_request'
@@ -300,9 +313,9 @@ jobs:
300
313
fi
301
314
fi
302
315
303
- echo ::set-output name= tag:: ${TAG}
304
- echo ::set-output name= org:: ${OWNER}
305
- echo ::set-output name= cur:: ${GHCR_IMAGE}:sha-${GITHUB_SHA::8}
316
+ echo tag=" ${TAG}" >> "$GITHUB_OUTPUT"
317
+ echo org=" ${OWNER}" >> "$GITHUB_OUTPUT"
318
+ echo cur=" ${GHCR_IMAGE}:sha-${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT"
306
319
307
320
- name : Monitor Service image with Snyk
308
321
uses : snyk/actions/docker@master
@@ -325,6 +338,11 @@ jobs:
325
338
image : ${{ steps.tag.outputs.tag }}
326
339
args : --org=${{ steps.tag.outputs.org }} --file=${{ matrix.context }}/Dockerfile
327
340
341
+ - name : Replace security-severity undefined for license-related findings
342
+ run : |
343
+ sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
344
+ sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarif
345
+
328
346
- name : Secure Code Warrior
329
347
uses : SecureCodeWarrior/github-action-add-sarif-contextual-training@v1
330
348
with :
@@ -381,7 +399,7 @@ jobs:
381
399
RELEASE_VERSION="${{ needs.setup.outputs.version }}" \
382
400
./release/make.sh | tee $RELEASE
383
401
384
- echo ::set-output name= composefile::$ RELEASE
402
+ echo composefile="${ RELEASE}" >> "$GITHUB_OUTPUT"
385
403
386
404
# TODO: More detailed check?
387
405
- name : Verify Compose File
0 commit comments