-
Notifications
You must be signed in to change notification settings - Fork 21
37 lines (37 loc) · 938 Bytes
/
scan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Scan
on:
pull_request:
push:
branches:
- main
tags:
- "v*"
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build binary
run: make build
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Build image
uses: docker/[email protected]
with:
context: .
tags: ghcr.io/rancher/gke-operator:${{ github.sha }}
load: true
push: false
file: package/Dockerfile
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/rancher/gke-operator:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"