mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-19 17:26:39 +00:00
24 lines
587 B
YAML
24 lines
587 B
YAML
name: cve-scan
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
trivy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Build image
|
|
id: build
|
|
run: |
|
|
IMAGE=test/podinfo:${GITHUB_SHA}
|
|
docker build -t ${IMAGE} .
|
|
echo "::set-output name=image::$IMAGE"
|
|
- name: Scan image
|
|
uses: docker://docker.io/aquasec/trivy:latest
|
|
with:
|
|
args: --cache-dir /var/lib/trivy --no-progress --exit-code 1 --severity MEDIUM,HIGH,CRITICAL ${{ steps.build.outputs.image }}
|