Only run Trivy against Dockerfile changes

As the Trivy run is scheduled via cron, we should only run in addition to that if the Dockerfile itself is changed.
This commit is contained in:
Seth Simmons
2021-07-13 19:45:44 +00:00
committed by GitHub
parent 2fbacfeb5b
commit c8fa7fd543

View File

@@ -2,10 +2,11 @@ name: Build and scan container for vulnerabilities with Trivy
on:
push:
branches: [ main ]
paths:
- 'Dockerfile'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- 'Dockerfile'
schedule:
- cron: '22 14 * * 0'