mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build images
|
|
permissions: {}
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
paths:
|
|
- '.github/workflows/docker-*.yml'
|
|
- 'api/**'
|
|
- 'controllers/**'
|
|
- 'pkg/**'
|
|
- 'e2e/*'
|
|
- '.ko.yaml'
|
|
- 'go.*'
|
|
- 'main.go'
|
|
- 'Makefile'
|
|
|
|
jobs:
|
|
build-images:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
actions: read
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: ko build
|
|
run: VERSION=${{ github.sha }} make ko-build-all
|
|
- name: Trivy Scan Image
|
|
uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0
|
|
with:
|
|
scan-type: 'fs'
|
|
ignore-unfixed: true
|
|
format: 'sarif'
|
|
output: 'trivy-results.sarif'
|
|
severity: 'CRITICAL,HIGH'
|
|
env:
|
|
# Trivy is returning TOOMANYREQUESTS
|
|
# See: https://github.com/aquasecurity/trivy-action/issues/389#issuecomment-2385416577
|
|
TRIVY_DB_REPOSITORY: 'public.ecr.aws/aquasecurity/trivy-db:2'
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
uses: github/codeql-action/upload-sarif@ed51cb5abd90d0e898e492d5e3f24423da71c2fb
|
|
with:
|
|
sarif_file: 'trivy-results.sarif'
|