Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Bump golang from 1.20 to 1.21 #53

Merged
merged 5 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/go/.devcontainer/base.Dockerfile

# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster
ARG VARIANT="1.20-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
ARG VARIANT="1.21-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "1.20-bullseye",
"VARIANT": "1.21-bullseye",
// Options
"NODE_VERSION": "none",
"VULNCHECK_VERSION": "v1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: '1.21'
- name: Compile Action
run: go build -v ./...
unit-testing:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: '1.21'
- name: Run Unit Test with Racecondition Detector
run: go test -race ./...
- name: Run Unit Tests with Coverage
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG GOLANG_VERSION=1.20
ARG GOLANG_VERSION=1.21
# This golang version is for the builder only
FROM golang:1.20 as builder
FROM golang:1.21 as builder

WORKDIR /go/src/github.com/Templum/govulncheck-action/
ENV GO111MODULE=on
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:

| Input | Description |
|----------------------------------|----------------------------------------------------------------------------------------------------------------|
| `go-version` _(optional)_ | Version of Go used for scanning the code, should equal *your* runtime version. Defaults to `1.20.6` |
| `go-version` _(optional)_ | Version of Go used for scanning the code, should equal *your* runtime version. Defaults to `1.21.4` |
| `vulncheck-version` _(optional)_ | Version of govulncheck that should be used, by default `v1.0.0` |
| `package` _(optional)_ | The package you want to scan, by default will be `./...` |
| `github-token` _(optional)_ | Github Token to upload sarif report. **Needs** `write` permissions for `security_events` |
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ inputs:
required: false
default: "./..."
go-version:
description: "Can be any Tag for the golang docker image, but should ideally match your runtime go version. By default 1.20.6 is assumed"
description: "Can be any Tag for the golang docker image, but should ideally match your runtime go version. By default 1.21.4 is assumed"
required: false
default: "1.20.6"
default: "1.21.4"
vulncheck-version:
description: "Version of govulncheck that should be used, by default v1.0.0"
required: false
Expand Down
6 changes: 3 additions & 3 deletions pkg/action/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ func ReadRuntimeInfoFromEnv() *RuntimeInfos {

if strings.Contains(env, "GOARCH") {
keyVal := strings.SplitAfter(env, "=")
info.Arch = strings.Trim(keyVal[1], "\"")
info.Arch = strings.Trim(strings.Trim(keyVal[1], "\""), "'")
}

if strings.Contains(env, "GOVERSION") {
keyVal := strings.SplitAfter(env, "=")
info.Version = strings.Trim(keyVal[1], "\"")
info.Version = strings.Trim(strings.Trim(keyVal[1], "\""), "'")
}

if strings.Contains(env, "GOOS") {
keyVal := strings.SplitAfter(env, "=")
info.Os = strings.Trim(keyVal[1], "\"")
info.Os = strings.Trim(strings.Trim(keyVal[1], "\""), "'")
}

}
Expand Down