File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : build
2+ on :
3+ push :
4+ branches : [ main ]
5+ pull_request :
6+ jobs :
7+ build :
8+ name : Build
9+ runs-on : " ubuntu-18.04"
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v2
13+
14+ - name : Build an image from Dockerfile
15+ run : |
16+ docker build -t ghcr.io/naveensrinivasna/k8s-namespace-operator:${{ github.sha }} .
17+
18+ - name : Run Trivy vulnerability scanner
19+ uses : aquasecurity/trivy-action@master
20+ with :
21+ image-ref : ' docker.io/my-organization/my-app:${{ github.sha }}'
22+ format : ' template'
23+ template : ' @/contrib/sarif.tpl'
24+ output : ' trivy-results.sarif'
25+ severity : ' CRITICAL,HIGH'
26+
27+ - name : Upload Trivy scan results to GitHub Security tab
28+ uses : github/codeql-action/upload-sarif@v1
29+ with :
30+ sarif_file : ' trivy-results.sarif'
You can’t perform that action at this time.
0 commit comments