Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Docker Image CI

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

jobs:

build:
name: "Build Docker images"
runs-on: ubuntu-24.04
Expand All @@ -24,6 +22,8 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64 # ,linux/arm64

- name: "LINT: Build and push"
uses: docker/build-push-action@v6
Expand All @@ -34,6 +34,7 @@ jobs:
type=docker,dest=/tmp/${{ env.ARTIFACT_NAME }}_lint.tar
tags: |
${{ env.IMAGE_NAME }}:lint
platforms: linux/amd64 # ,linux/arm64
- name: "LINT: Upload artifact"
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -167,7 +168,7 @@ jobs:
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'snyk.sarif'
sarif_file: "snyk.sarif"
scan:
name: "Trivy"
runs-on: ubuntu-24.04
Expand All @@ -192,20 +193,20 @@ jobs:
uses: aquasecurity/[email protected]
with:
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
format: 'table'
format: "table"
env:
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}

- name: Run Trivy vulnerability scanner (sarif report)
uses: aquasecurity/[email protected]
with:
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
format: 'sarif'
output: 'trivy-results.sarif'
format: "sarif"
output: "trivy-results.sarif"
env:
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
sarif_file: "trivy-results.sarif"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:noble-20250404 AS init
FROM ubuntu:noble-20250415.1 AS init

ENV WORKDIR=/app
WORKDIR ${WORKDIR}
Expand Down Expand Up @@ -113,7 +113,7 @@ COPY --from=builder ${WORKDIR}/build ${WORKDIR}/

CMD ["make", "test"]

FROM ubuntu:noble-20250404 AS production
FROM ubuntu:noble-20250415.1 AS production

ENV LOG_LEVEL=INFO
ENV BRUTEFORCE=false
Expand Down
Loading