MeetUp/.github/workflows/container-scan.yml
Dominik Stahl 28b9737bfa
All checks were successful
container-scan / Container Scan (pull_request) Successful in 7m11s
docker-build / docker (pull_request) Successful in 8m2s
tests / Tests (pull_request) Successful in 8m32s
fix(test): fix testing ci workflow and clean up docker
2025-05-20 08:36:14 +02:00

38 lines
1.2 KiB
YAML

name: container-scan
on:
push:
branches:
- main
pull_request:
jobs:
container-scan:
name: Container Scan
runs-on: docker
container:
image: ghcr.io/di0ik/forgejo_runner_container:main@sha256:c66a37d9af18f8f0f34d16890082bc08d842d52ff2a2bc36d993e3d347b498ac
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Build an image from Dockerfile
run: docker buildx build -t meetup_trivy .
- name: Install Trivy
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.61.0
- name: Run Trivy vulnerability scanner
run: |
trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format table meetup_trivy
trivy image --exit-code 1 --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed --no-progress --format json meetup_trivy > trivy-report.json
- name: Upload Trivy report
uses: forgejo/upload-artifact@v4
with:
path: trivy-report.json
- name: Clean up Docker
if: always()
run: |
docker system prune -af
docker volume prune -f