Dependency Updates #199
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Build | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: ['develop'] | |
tags: ['*'] | |
pull_request: | |
branches: ['develop'] | |
jobs: | |
Setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Install Dependencies | |
run: go get . | |
- name: Verify | |
run: make vet | |
Test: | |
needs: Setup | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
k8s-version: ['1.24', '1.25', '1.26', '1.27'] | |
env: | |
ENVTEST_K8S_VERSION: ${{ matrix.k8s-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Set up envtest | |
run: | | |
make envtest | |
echo "KUBEBUILDER_ASSETS=$(bin/setup-envtest use $ENVTEST_K8S_VERSION -p path)" >> $GITHUB_ENV | |
- name: Test | |
run: make test | |
Build: | |
needs: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Build | |
run: make build | |
- name: Upload manager | |
uses: actions/upload-artifact@v3 | |
with: | |
name: manager | |
path: manager | |
retention-days: 1 | |
Scan: | |
needs: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download manager | |
uses: actions/download-artifact@v3 | |
- name: Scan with Trivy | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'fs' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
severity: 'MEDIUM,HIGH,CRITICAL' | |
- name: Upload scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: 'trivy-results.sarif' |