Skip to content

workflows

workflows #4

Workflow file for this run

name: Trivy Container Image Scan
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build an image from Dockerfile
run: |
docker build -f /Dockerfile -t docker.io/tquinnelly/clamav-alpine:${{ github.sha }} .
- name: Run Trivy vulnerability scanner for latest
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: 'docker.io/tquinnelly/clamav-alpine:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Build an image from Dockerfile
run: |
docker build -f /Dockerfile-edge.dockerfile -t docker.io/tquinnelly/clamav-alpine:${{ github.sha }} .
- name: Run Trivy vulnerability scanner for latest
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: 'docker.io/tquinnelly/clamav-alpine:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-results.sarif'