From e768225742cb3160e6861cb2fe00c07419343970 Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Mon, 15 Jul 2024 14:47:56 -0400 Subject: [PATCH] build: run govulncheck with go version from build image (#2931) --- .github/workflows/govulncheck.yaml | 8 +++++++- go.mod | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/govulncheck.yaml b/.github/workflows/govulncheck.yaml index 08568cdbd4..2a7c967952 100644 --- a/.github/workflows/govulncheck.yaml +++ b/.github/workflows/govulncheck.yaml @@ -15,6 +15,12 @@ jobs: steps: - name: 'Checkout Repository' uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + ## Go version from build image is used in the govulncheck step + - name: 'Get go version from build image' + id: go_version + run: | + version=$(docker run ghcr.io/kanisterio/build go version | { read _ _ v _; echo ${v#go}; }) + echo "go_version=$version" >> "$GITHUB_OUTPUT" - id: govulncheck name: 'Govulncheck' uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3 @@ -22,4 +28,4 @@ jobs: with: repo-checkout: false cache: false - go-version-file: go.mod + go-version-input: ${{ steps.go_version.outputs.go_version }} diff --git a/go.mod b/go.mod index 1947fef889..e85f5063fc 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/kanisterio/kanister go 1.22 -toolchain go1.22.2 +toolchain go1.22.4 replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1