Skip to content

Commit e372237

Browse files
deferrazAndre Ferraz
and
Andre Ferraz
authored
chore: bump go version to 1.20 (argoproj-labs#564)
* bump go version to 1.20 Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * change golang version in actions to 1.20 Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * bump golangci-lint-action and setup-go to v3 Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * change actions/checkout to v3 Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * bump golangci-lint-action to v1.52.2 Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * these 3 linters were deprecated in favor of unused Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> * go linter fix Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> --------- Signed-off-by: Andre Ferraz <andre.ferraz@loggi.com> Co-authored-by: Andre Ferraz <andre.ferraz@loggi.com>
1 parent 49825ec commit e372237

File tree

7 files changed

+21
-23
lines changed

7 files changed

+21
-23
lines changed

.github/workflows/ci-tests.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818
- name: Setup Golang
19-
uses: actions/setup-go@v1
19+
uses: actions/setup-go@v3
2020
with:
21-
go-version: '1.18'
21+
go-version: '1.20'
2222
- name: Download all Go modules
2323
run: |
2424
go mod download
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout code
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
3535
- name: Install Kustomize v2
3636
run: |
3737
set -xo pipefail
@@ -53,22 +53,22 @@ jobs:
5353
runs-on: ubuntu-latest
5454
steps:
5555
- name: Checkout code
56-
uses: actions/checkout@v2
56+
uses: actions/checkout@v3
5757
- name: Run golangci-lint
58-
uses: golangci/golangci-lint-action@v2
58+
uses: golangci/golangci-lint-action@v3
5959
with:
60-
version: v1.46.2
60+
version: v1.52.2
6161
args: --timeout 5m
6262
test:
6363
name: Ensure unit tests are passing
6464
runs-on: ubuntu-latest
6565
steps:
6666
- name: Checkout code
67-
uses: actions/checkout@v2
67+
uses: actions/checkout@v3
6868
- name: Setup Golang
69-
uses: actions/setup-go@v1
69+
uses: actions/setup-go@v3
7070
with:
71-
go-version: '1.18'
71+
go-version: '1.20'
7272
- name: Run tests
7373
env:
7474
GNUPG_DISABLED: true

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

.github/workflows/image.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
path: argocd-image-updater
2121
- name: Setup qemu

.golangci.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ run:
77
linters:
88
enable:
99
- vet
10-
- deadcode
1110
- goimports
12-
- varcheck
13-
- structcheck
1411
- ineffassign
1512
- unconvert
1613
- unparam
14+
- unused
1715
linters-settings:
1816
goimports:
1917
local-prefixes: github.com/argoproj-labs/argocd-image-updater

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18 AS builder
1+
FROM golang:1.20 AS builder
22

33
RUN mkdir -p /src/argocd-image-updater
44
WORKDIR /src/argocd-image-updater

ext/git/client.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ func NewClientExt(rawRepoURL string, root string, creds Creds, insecure bool, en
155155

156156
// Returns a HTTP client object suitable for go-git to use using the following
157157
// pattern:
158-
// - If insecure is true, always returns a client with certificate verification
159-
// turned off.
160-
// - If one or more custom certificates are stored for the repository, returns
161-
// a client with those certificates in the list of root CAs used to verify
162-
// the server's certificate.
163-
// - Otherwise (and on non-fatal errors), a default HTTP client is returned.
158+
// - If insecure is true, always returns a client with certificate verification
159+
// turned off.
160+
// - If one or more custom certificates are stored for the repository, returns
161+
// a client with those certificates in the list of root CAs used to verify
162+
// the server's certificate.
163+
// - Otherwise (and on non-fatal errors), a default HTTP client is returned.
164164
func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds, proxyURL string) *http.Client {
165165
// Default HTTP client
166166
var customHTTPClient = &http.Client{

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/argoproj-labs/argocd-image-updater
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
github.com/Masterminds/semver v1.5.0

0 commit comments

Comments
 (0)