From 9953aeab55ca49fd0fb275f2e40fe42dfcad9fa3 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Thu, 20 Jul 2023 10:55:30 +0300 Subject: [PATCH] use Go 1.20.x Signed-off-by: Mikko Ylinen --- .github/workflows/gofmt.yaml | 7 ++++--- .github/workflows/golangci-lint.yaml | 7 ++++--- .github/workflows/makefile.yml | 5 +++-- Dockerfile | 2 +- go.mod | 2 +- tests/e2e/ansible/group_vars/all | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gofmt.yaml b/.github/workflows/gofmt.yaml index 1b14fd9e..b20eb0da 100644 --- a/.github/workflows/gofmt.yaml +++ b/.github/workflows/gofmt.yaml @@ -12,10 +12,11 @@ jobs: name: gofmt runs-on: ubuntu-22.04 steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + check-latest: true - name: gofmt run : | gofmt -s -w . diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index a9381ee3..b60ded0e 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -12,10 +12,11 @@ jobs: name: lint runs-on: ubuntu-22.04 steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + check-latest: true - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index de71377e..bc0ae8be 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -15,9 +15,10 @@ jobs: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version-file: go.mod + check-latest: true - name: Download controller-gen run: make controller-gen diff --git a/Dockerfile b/Dockerfile index cc600c7d..6a61074e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG IMG_NAME ARG IMG_VERSION # Build the manager binary -FROM ${IMG_NAME:-golang}:${IMG_VERSION:-1.18} as builder +FROM ${IMG_NAME:-golang}:${IMG_VERSION:-1.20} as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/go.mod b/go.mod index 10a88806..2666ddbf 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/confidential-containers/operator -go 1.18 +go 1.20 require ( github.com/go-logr/logr v1.2.3 diff --git a/tests/e2e/ansible/group_vars/all b/tests/e2e/ansible/group_vars/all index 294e6349..3d6827d7 100644 --- a/tests/e2e/ansible/group_vars/all +++ b/tests/e2e/ansible/group_vars/all @@ -10,7 +10,7 @@ build_pkgs: - make - gcc container_runtime: containerd -go_version: 1.18.5 +go_version: 1.20.7 operator_sdk_version: v1.23.0 # conntrack and socat are needed by the `kubeadm init` preflight checks kubeadm_pkgs: