no vulnscan su build #152

Merged
paspo merged 1 commits from paspo/bglug.it:action into main 2024-07-23 18:17:01 +00:00
Showing only changes of commit 6b311ca773 - Show all commits

View File

@ -1,9 +1,10 @@
---
name: Container Publish name: Container Publish
on: on:
push: push:
tags: tags:
- '*' - 'live'
schedule: schedule:
- cron: "0 12 * * *" - cron: "0 12 * * *"
@ -31,26 +32,6 @@ jobs:
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and publish
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
load: true
tags: git.libreschool.org/bglug/bglug.it:latest
- name: Run Trivy vulnerability scanner
id: scan
uses: aquasecurity/trivy-action@master
with:
image-ref: "git.libreschool.org/bglug/bglug.it:latest"
format: "json"
output: "trivy-results.json"
- name: check output
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
- name: Build and publish - name: Build and publish
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with: