Skip to content

Commit d1b247f

Browse files
authored
run trivy on release branch (#1068)
extend trivy scan to release branch: * add schedule to run every day at 11 p.m on release branch
1 parent f6dce01 commit d1b247f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/trivy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Trivy
33
on:
44
schedule:
55
- cron: "0 0 * * *"
6+
- cron: "0 23 * * *"
67
pull_request:
78
branches:
89
- main
@@ -34,10 +35,23 @@ jobs:
3435
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
3536
steps:
3637
- name: Checkout code
38+
if: github.event_name == 'schedule' && github.event.schedule == '0 23 * * '
39+
uses: actions/checkout@v2
40+
with:
41+
ref: maint-25.02 # tmp branch
42+
- name: Checkout code
43+
if: github.event_name == 'schedule' && github.event.schedule == '0 0 * * '
44+
uses: actions/checkout@v2
45+
with:
46+
ref: main
47+
48+
- name: Checkout code
49+
if: github.event_name != 'schedule'
3750
uses: actions/checkout@v2
3851
with:
3952
ref: ${{ inputs.branch }}
4053

54+
4155
- name: Run Trivy vulnerability scanner with sarif output
4256
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
4357
with:

0 commit comments

Comments
 (0)