42 lines
937 B
YAML
42 lines
937 B
YAML
name: build
|
|
|
|
env:
|
|
TRIVY_VERSION: 0.49.0
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "@daily"
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
image-build:
|
|
runs-on: ubuntu-latest
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
|
- name: checkout git repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install docker commands
|
|
run: |
|
|
apt update
|
|
apt remove -y moby-cli
|
|
apt install -y docker-compose-v2
|
|
|
|
- name: Build images
|
|
run: |
|
|
docker compose --progress plain build
|
|
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@master
|
|
with:
|
|
image-ref: 'docker.io/library/app:3.9.9-slim-bullseye'
|
|
scan-type: image
|
|
format: 'sarif'
|
|
output: 'dependency-results.sbom.json'
|
|
exit-code: '0'
|
|
# ignore-unfixed: true
|
|
# vuln-type: 'os,library'
|
|
# severity: 'CRITICAL,HIGH'
|