summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Ferraz <31141+deferraz@users.noreply.github.com>2023-06-08 14:48:08 -0300
committerGitHub <noreply@github.com>2023-06-08 13:48:08 -0400
commite372237aabfdb422e77b768b41114497c60f332d (patch)
treea792c66a51439d0e228297876c8eac59b1554c2b
parent49825ec4df76b3d2571515525ac71b83efd30acc (diff)
chore: bump go version to 1.20 (#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>
-rw-r--r--.github/workflows/ci-tests.yaml20
-rw-r--r--.github/workflows/codeql-analysis.yml2
-rw-r--r--.github/workflows/image.yaml2
-rw-r--r--.golangci.yml4
-rw-r--r--Dockerfile2
-rw-r--r--ext/git/client.go12
-rw-r--r--go.mod2
7 files changed, 21 insertions, 23 deletions
diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml
index 445b0ba..46abe21 100644
--- a/.github/workflows/ci-tests.yaml
+++ b/.github/workflows/ci-tests.yaml
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Setup Golang
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v3
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Download all Go modules
run: |
go mod download
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install Kustomize v2
run: |
set -xo pipefail
@@ -53,22 +53,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Run golangci-lint
- uses: golangci/golangci-lint-action@v2
+ uses: golangci/golangci-lint-action@v3
with:
- version: v1.46.2
+ version: v1.52.2
args: --timeout 5m
test:
name: Ensure unit tests are passing
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Setup Golang
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v3
with:
- go-version: '1.18'
+ go-version: '1.20'
- name: Run tests
env:
GNUPG_DISABLED: true
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index b189361..464bba6 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -38,7 +38,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml
index 501406c..4758984 100644
--- a/.github/workflows/image.yaml
+++ b/.github/workflows/image.yaml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: argocd-image-updater
- name: Setup qemu
diff --git a/.golangci.yml b/.golangci.yml
index 440adbd..fb4e97b 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -7,13 +7,11 @@ run:
linters:
enable:
- vet
- - deadcode
- goimports
- - varcheck
- - structcheck
- ineffassign
- unconvert
- unparam
+ - unused
linters-settings:
goimports:
local-prefixes: github.com/argoproj-labs/argocd-image-updater
diff --git a/Dockerfile b/Dockerfile
index d5acc3d..ec38e46 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.18 AS builder
+FROM golang:1.20 AS builder
RUN mkdir -p /src/argocd-image-updater
WORKDIR /src/argocd-image-updater
diff --git a/ext/git/client.go b/ext/git/client.go
index fa470bc..11a9a75 100644
--- a/ext/git/client.go
+++ b/ext/git/client.go
@@ -155,12 +155,12 @@ func NewClientExt(rawRepoURL string, root string, creds Creds, insecure bool, en
// Returns a HTTP client object suitable for go-git to use using the following
// pattern:
-// - If insecure is true, always returns a client with certificate verification
-// turned off.
-// - If one or more custom certificates are stored for the repository, returns
-// a client with those certificates in the list of root CAs used to verify
-// the server's certificate.
-// - Otherwise (and on non-fatal errors), a default HTTP client is returned.
+// - If insecure is true, always returns a client with certificate verification
+// turned off.
+// - If one or more custom certificates are stored for the repository, returns
+// a client with those certificates in the list of root CAs used to verify
+// the server's certificate.
+// - Otherwise (and on non-fatal errors), a default HTTP client is returned.
func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds, proxyURL string) *http.Client {
// Default HTTP client
var customHTTPClient = &http.Client{
diff --git a/go.mod b/go.mod
index 23f1efe..3659112 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/argoproj-labs/argocd-image-updater
-go 1.18
+go 1.20
require (
github.com/Masterminds/semver v1.5.0