forked from LibreSchool/libreschool.org
vulnscan prima di pushare
This commit is contained in:
parent
4169a0a30f
commit
486b33b3d4
@ -31,6 +31,28 @@ 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@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
# linux/arm64
|
||||||
|
load: true
|
||||||
|
tags: git.libreschool.org/libreschool/libreschool.org:latest
|
||||||
|
|
||||||
|
- name: Run Trivy vulnerability scanner
|
||||||
|
id: scan
|
||||||
|
uses: aquasecurity/trivy-action@master
|
||||||
|
with:
|
||||||
|
image-ref: "git.libreschool.org/libreschool/libreschool.org: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@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user