Update aqua-cloud.yml #1516
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: Pull Request | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
GO_VERSION: "1.18" | |
jobs: | |
build: | |
name: Checks | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Setup golangci-lint | |
uses: golangci/[email protected] | |
with: | |
args: --timeout=10m --verbose | |
version: v1.45 | |
- name: Build | |
run: make build | |
- name: Run Unit Tests | |
run: make test | |
- name: Run Integration Tests | |
run: make test-integration | |
- name: Run Trivy vulnerability scanner in repo mode | |
uses: aquasecurity/[email protected] | |
with: | |
scan-type: 'fs' | |
ignore-unfixed: true | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
severity: 'CRITICAL' | |
exit-code: 0 | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: 'trivy-results.sarif' | |
- name: Run Trivy vulnerability scanner in IaC mode | |
uses: aquasecurity/[email protected] | |
with: | |
scan-type: 'config' | |
hide-progress: false | |
format: 'table' |