Skip to content

Commit ddfa409

Browse files
committed
👷 ci(trivy): move trivy to cron
1 parent fd77593 commit ddfa409

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,3 @@ jobs:
4242
run: bash -c "make check-helm-docs"
4343
- name: 🔎 Check manifest
4444
run: bash -c "make check-helm-manifest"
45-
- name: 🔎 Trivy-Scan
46-
id: trivyscan
47-
run: make trivy-scan
48-
# - name: Upload Trivy results
49-
# if: ${{ github.event_name != 'pull_request' }}
50-
# uses: github/codeql-action/upload-sarif@v4
51-
# with:
52-
# sarif_file: './.trivyscan/report.sarif'

.github/workflows/trivy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- kubernetes-*
7+
- main
8+
schedule:
9+
- cron: "28 6 * * 0"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
Trivy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: ⬇️ Checkout repository
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
21+
- name: Image
22+
run: bash -c "make build-image"
23+
- name: 🔎 Trivy-Scan
24+
id: trivyscan
25+
run: make trivy-scan
26+
- name: ⬆️ Upload Trivy results
27+
if: ${{ github.event_name != 'pull_request' }}
28+
uses: github/codeql-action/upload-sarif@v4
29+
with:
30+
sarif_file: './.trivyscan/report.sarif'

0 commit comments

Comments
 (0)