Files
mealie/.github/workflows/partial-trivy-container-scanning.yml
Trenton H c3ec875d59 chore: remove GitHub Actions deprecated command (#2790)
* Resolves GitHub Actions usage of deprecated command for setting output

* Updates action versions to the latest released versions

---------

Co-authored-by: Trenton Holmes <trenton.holmes@psware.com>
2023-12-11 14:57:13 +00:00

32 lines
757 B
YAML

name: Trivy Container Scanning
on:
workflow_call:
jobs:
build:
name: Build and Scan Container
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Dockerfile
run: |
docker build -t mealie --file=./docker/Dockerfile .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
ignore-unfixed: true
image-ref: "mealie"
format: "sarif"
output: "trivy-results.sarif"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"