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

consistently use go 1.17 throughout repository #161

Merged
merged 2 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.17
Expand Down Expand Up @@ -53,27 +53,36 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Lint
uses: golangci/golangci-lint-action@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were to update to golangci/golangci-lint-action@v3 it would use the existing installed go version that was setup with the actions/setup-go@v2

I think it may be worth it to upgrade this so that we wouldn't have to handle updating the with.version. What do you think?

with:
version: v1.35.2
version: v1.45.2

go-apidiff:
name: go-apidiff
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.16
go-version: ~1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Run go-apidiff
uses: joelanford/go-apidiff@main
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
# Hooks to run before any build is run.
before:
hooks:
- go version | grep --quiet "go1\.15\.6" || echo "Go binary version must be 1.15.6"
- go version | grep --quiet "go1\.17" || echo "Go binary version must be 1.17.x"
- go mod download

# Binary builds.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM --platform=$BUILDPLATFORM golang:1.15 as builder
FROM --platform=$BUILDPLATFORM golang:1.17 as builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fix:
# Run various checks against code
.PHONY: lint
lint:
fetch golangci-lint 1.43.0 && golangci-lint run
fetch golangci-lint 1.45.2 && golangci-lint run

.PHONY: release
release: GORELEASER_ARGS ?= --snapshot --rm-dist --skip-sign
Expand Down