1
1
---
2
-
3
2
name : Docker Image CI
4
3
5
4
on : # yamllint disable-line rule:truthy
15
14
ARTIFACT_NAME : algorithm-exercises-c_${{ github.sha }}
16
15
17
16
jobs :
18
-
19
17
build :
20
18
name : " Build Docker images"
21
19
runs-on : ubuntu-24.04
24
22
25
23
- name : Set up Docker Buildx
26
24
uses : docker/setup-buildx-action@v3
25
+ with :
26
+ platforms : linux/amd64 # ,linux/arm64
27
27
28
28
- name : " LINT: Build and push"
29
29
uses : docker/build-push-action@v6
34
34
type=docker,dest=/tmp/${{ env.ARTIFACT_NAME }}_lint.tar
35
35
tags : |
36
36
${{ env.IMAGE_NAME }}:lint
37
+ platforms : linux/amd64 # ,linux/arm64
37
38
- name : " LINT: Upload artifact"
38
39
uses : actions/upload-artifact@v4
39
40
with :
@@ -167,7 +168,7 @@ jobs:
167
168
- name : Upload result to GitHub Code Scanning
168
169
uses : github/codeql-action/upload-sarif@v3
169
170
with :
170
- sarif_file : ' snyk.sarif'
171
+ sarif_file : " snyk.sarif"
171
172
scan :
172
173
name : " Trivy"
173
174
runs-on : ubuntu-24.04
@@ -192,20 +193,20 @@ jobs:
192
193
uses :
aquasecurity/[email protected]
193
194
with :
194
195
image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
195
- format : ' table'
196
+ format : " table"
196
197
env :
197
198
TRIVY_DB_REPOSITORY : ${{ vars.TRIVY_DB_REPOSITORY }}
198
199
199
200
- name : Run Trivy vulnerability scanner (sarif report)
200
201
uses :
aquasecurity/[email protected]
201
202
with :
202
203
image-ref : ${{ env.IMAGE_NAME }}:${{ github.sha }}
203
- format : ' sarif'
204
- output : ' trivy-results.sarif'
204
+ format : " sarif"
205
+ output : " trivy-results.sarif"
205
206
env :
206
207
TRIVY_DB_REPOSITORY : ${{ vars.TRIVY_DB_REPOSITORY }}
207
208
208
209
- name : Upload Trivy scan results to GitHub Security tab
209
210
uses : github/codeql-action/upload-sarif@v3
210
211
with :
211
- sarif_file : ' trivy-results.sarif'
212
+ sarif_file : " trivy-results.sarif"
0 commit comments