mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2025-08-23 14:23:05 +00:00
- Update Trivy action reference to use the correct repository format Signed-off-by: appleboy <appleboy.tw@gmail.com>
42 lines
900 B
YAML
42 lines
900 B
YAML
name: check-and-test
|
|
|
|
on:
|
|
- pull_request
|
|
|
|
jobs:
|
|
check-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
- name: build
|
|
run: |
|
|
make build
|
|
|
|
govulncheck_job:
|
|
runs-on: ubuntu-latest
|
|
name: Run govulncheck
|
|
steps:
|
|
- id: govulncheck
|
|
uses: golang/govulncheck-action@v1
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
go-package: ./...
|
|
|
|
code-scan:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Run Trivy vulnerability scanner in repo mode
|
|
uses: aquasecurity/trivy-action@0.28.0
|
|
with:
|
|
scan-type: 'fs'
|
|
ignore-unfixed: true
|
|
format: 'sarif'
|
|
output: 'trivy-results.sarif'
|
|
exit-code: '1'
|
|
severity: 'CRITICAL,HIGH'
|