Skip to content

Commit b69e095

Browse files
authored
update go 1.26 (#168)
* upgrade go 1.26
1 parent bd06cc1 commit b69e095

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/govulncheck-action-test-lint.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,14 @@ jobs:
4040
- name: Checkout code
4141
uses: actions/checkout@v4
4242

43-
- name: Lint
44-
uses: golangci/golangci-lint-action@v9
43+
- name: Install Go
44+
uses: actions/setup-go@v6
4545
with:
46-
working-directory: govulncheck-action
47-
version: v2.7.2
48-
args: --config=.golangci.yml --verbose .
46+
go-version-file: govulncheck-action/go.mod
47+
48+
- name: Install golangci-lint
49+
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.2
50+
51+
- name: Lint
52+
working-directory: govulncheck-action
53+
run: golangci-lint run --path-mode=abs --config=.golangci.yml --verbose ./...

govulncheck-action/Containerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24.0 as builder
1+
FROM golang:1.26.0 as builder
22

33
ARG GOOS=linux
44
ARG GOARCH=amd64
@@ -12,10 +12,9 @@ ENV GOTOOLCHAIN=auto
1212
RUN echo "Building govulncheckx binary for $GOOS/$GOARCH"
1313
RUN GOOS=$GOOS GOARCH=$GOARCH go build -v -o govulncheckx main.go
1414

15-
FROM golang:1.24.0
15+
FROM golang:1.26.0
1616
# using a fresh golang image without the `WORKDIR` from the builder stage
1717
# see https://docs.github.com/en/actions/reference/workflows-and-actions/dockerfile-support#workdir
18-
# using golang 1.24.0 since most of our projects are still using it (and toolchain will not downgrade the version of go)
1918

2019
# copy the binary from the builder stage
2120
COPY --from=builder /usr/src/app/govulncheckx /usr/local/bin/govulncheckx

govulncheck-action/go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/codeready-toolchain/toolchain-cicd/govulncheck-action
22

3-
go 1.24.0
4-
5-
toolchain go1.24.13
3+
go 1.26.0
64

75
require (
86
github.com/spf13/cobra v1.9.1

0 commit comments

Comments
 (0)