POS-2821: govulncheck CI and make command / bump golang

This commit is contained in:
marcello33 2025-02-07 10:38:59 +01:00
parent 70e513cac4
commit 315068601e
No known key found for this signature in database
GPG key ID: 06128777E3C36B16
7 changed files with 33 additions and 29 deletions

View file

@ -1,25 +0,0 @@
name: Govuln
on: [ push, pull_request ]
jobs:
govuln:
name: Run govuln check and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Running govulncheck
uses: Templum/govulncheck-action@v1.0.2
continue-on-error: false
env:
DEBUG: "true"
with:
go-version: 1.23
package: ./...
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-vuln: true
- name: Upload govulncheck report
uses: actions/upload-artifact@v4.4.0
with:
name: raw-report
path: raw-report.json

23
.github/workflows/govulncheck.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Govuln
on: [ push, pull_request ]
jobs:
govulncheck:
name: Run govulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.23.6"
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/*.go
go.mod
go.sum
Makefile
- name: govulncheck
run: make vulncheck
if: "env.GIT_DIFF != ''"

View file

@ -24,7 +24,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@master uses: actions/setup-go@master
with: with:
go-version: 1.23.2 go-version: 1.23.6
# Variables # Variables
- name: Adding TAG to ENV - name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

View file

@ -25,7 +25,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@master uses: actions/setup-go@master
with: with:
go-version: 1.23.2 go-version: 1.23.6
- name: Adding TAG to ENV - name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

View file

@ -24,7 +24,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@master uses: actions/setup-go@master
with: with:
go-version: 1.23.2 go-version: 1.23.6
- name: Adding TAG to ENV - name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

View file

@ -86,6 +86,12 @@ lintci-deps:
rm -f ./build/bin/golangci-lint rm -f ./build/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.63.4 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.63.4
.PHONY: vulncheck
vulncheck:
@go run golang.org/x/vuln/cmd/govulncheck@latest ./...
goimports: goimports:
goimports -local "$(PACKAGE)" -w . goimports -local "$(PACKAGE)" -w .

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/ethereum/go-ethereum module github.com/ethereum/go-ethereum
go 1.23.2 go 1.23.6
require ( require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2