File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,29 @@ jobs:
43
43
type=sha,format=short,prefix=
44
44
type=sha,format=long,prefix=
45
45
46
- - name : Build and push Docker image
47
- id : build-and-push
46
+ - name : Build Docker image
47
+ id : build
48
48
uses : docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
49
49
with :
50
50
context : .
51
- push : ${{ github.event_name != 'pull_request' }}
51
+ push : false
52
52
tags : ${{ steps.meta.outputs.tags }}
53
53
labels : ${{ steps.meta.outputs.labels }}
54
54
provenance : false
55
55
cache-from : type=gha
56
56
cache-to : type=gha,mode=max
57
+
58
+ - name : Scan image for vulnerabilities
59
+ uses : aquasecurity/trivy-action@master
60
+ with :
61
+ image-ref : ${{ steps.meta.outputs.tags }}
62
+ format : ' table'
63
+ exit-code : ' 1'
64
+ ignore-unfixed : true
65
+ vuln-type : ' os,library'
66
+ severity : ' CRITICAL,HIGH'
67
+
68
+ - name : Push Docker image
69
+ if : success() && github.event_name != 'pull_request'
70
+ run : |
71
+ docker push ${{ steps.meta.outputs.tags }}
You can’t perform that action at this time.
0 commit comments