Skip to content

Commit 2959b91

Browse files
renovate[bot]Gonzalo Diaz
authored andcommitted
[CONFIG] [Github Actions] Docker platforms.
1 parent 4f49fb3 commit 2959b91

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/docker-image.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: Docker Image CI
43

54
on: # yamllint disable-line rule:truthy
@@ -15,7 +14,6 @@ env:
1514
ARTIFACT_NAME: algorithm-exercises-c_${{ github.sha }}
1615

1716
jobs:
18-
1917
build:
2018
name: "Build Docker images"
2119
runs-on: ubuntu-24.04
@@ -24,6 +22,8 @@ jobs:
2422

2523
- name: Set up Docker Buildx
2624
uses: docker/setup-buildx-action@v3
25+
with:
26+
platforms: linux/amd64 # ,linux/arm64
2727

2828
- name: "LINT: Build and push"
2929
uses: docker/build-push-action@v6
@@ -34,6 +34,7 @@ jobs:
3434
type=docker,dest=/tmp/${{ env.ARTIFACT_NAME }}_lint.tar
3535
tags: |
3636
${{ env.IMAGE_NAME }}:lint
37+
platforms: linux/amd64 # ,linux/arm64
3738
- name: "LINT: Upload artifact"
3839
uses: actions/upload-artifact@v4
3940
with:
@@ -167,7 +168,7 @@ jobs:
167168
- name: Upload result to GitHub Code Scanning
168169
uses: github/codeql-action/upload-sarif@v3
169170
with:
170-
sarif_file: 'snyk.sarif'
171+
sarif_file: "snyk.sarif"
171172
scan:
172173
name: "Trivy"
173174
runs-on: ubuntu-24.04
@@ -192,20 +193,20 @@ jobs:
192193
uses: aquasecurity/[email protected]
193194
with:
194195
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
195-
format: 'table'
196+
format: "table"
196197
env:
197198
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}
198199

199200
- name: Run Trivy vulnerability scanner (sarif report)
200201
uses: aquasecurity/[email protected]
201202
with:
202203
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
203-
format: 'sarif'
204-
output: 'trivy-results.sarif'
204+
format: "sarif"
205+
output: "trivy-results.sarif"
205206
env:
206207
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}
207208

208209
- name: Upload Trivy scan results to GitHub Security tab
209210
uses: github/codeql-action/upload-sarif@v3
210211
with:
211-
sarif_file: 'trivy-results.sarif'
212+
sarif_file: "trivy-results.sarif"

0 commit comments

Comments
 (0)