Disable caching when running govulncheck (#2503)

* Migrate to golang official govulncheck action

* Remove unsupported go version from govulncheck

* Update vulncheck.yml

* Update vulncheck.yml

* Update template to disable caching

* Run checkout before setup-go
pull/2511/head
Juan Calderon-Perez 2023-06-19 07:33:18 -04:00 committed by GitHub
parent 2eaeb0f3f7
commit 78f4510b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -14,11 +14,11 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
# NOTE: Keep this in sync with the version from go.mod
go-version: 1.20.x
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:

View File

@ -1,3 +1,5 @@
name: Run govulncheck
on:
push:
branches:
@ -12,23 +14,22 @@ on:
- '**'
- '!docs/**'
- '!**.md'
name: Vulnerability Check
jobs:
Security:
govulncheck-check:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Fetch Repository
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: 'stable'
check-latest: true
- name: Fetch Repository
uses: actions/checkout@v3
cache: false
- name: Install Govulncheck
run: |
export GO111MODULE=on
export PATH=${PATH}:`go env GOPATH`/bin
go install golang.org/x/vuln/cmd/govulncheck@latest
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run Govulncheck
run: "`go env GOPATH`/bin/govulncheck ./..."
run: govulncheck ./...