Merge pull request #694 from strukturag/ci-govuln-check

CI: Run "govulncheck".
This commit is contained in:
Joachim Bauch 2024-05-16 13:22:39 +02:00 committed by GitHub
commit beee423a7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

46
.github/workflows/govuln.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Go Vulnerability Checker
on:
push:
branches: [ master ]
paths:
- '.github/workflows/govuln.yml'
- '**.go'
- 'go.*'
pull_request:
branches: [ master ]
paths:
- '.github/workflows/govuln.yml'
- '**.go'
- 'go.*'
schedule:
- cron: "0 2 * * SUN"
permissions:
contents: read
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- "1.21"
- "1.22"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: date
- name: Install dependencies
run: |
sudo apt -y update && sudo apt -y install protobuf-compiler
make common
- name: Install and run govulncheck
run: |
set -euo pipefail
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...