From 6cc8085ec55993fc52f2fe2d32a5a2ffe47d365f Mon Sep 17 00:00:00 2001 From: ewezy Date: Mon, 9 Sep 2024 16:03:06 +0800 Subject: [PATCH] Update golang and linter versions --- .github/workflows/ci-pipeline.yml | 6 +++--- Dockerfile | 2 +- Makefile | 2 +- api.Dockerfile | 2 +- go.mod | 6 ++---- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 430f7613..3372b83e 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -21,8 +21,8 @@ on: workflow_dispatch: env: - GO_VERSION: "1.20" - GO_LINT_VERSION: v1.51.2 + GO_VERSION: "1.22" + GO_LINT_VERSION: v1.58.1 NODE_VERSION: 20 ARTIFACT_RETENTION_DAYS: 7 CONTAINER_REGISTRY: ghcr.io @@ -102,7 +102,7 @@ jobs: cache-dependency-path: api/go.sum - name: Lint code - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v6 with: version: ${{ env.GO_LINT_VERSION }} skip-go-installation: true diff --git a/Dockerfile b/Dockerfile index 915b46e9..99bfaf27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN yarn app build # ============================================================ # Build stage 2: Build API # ============================================================ -FROM golang:1.20-alpine as go-builder +FROM golang:1.22-alpine as go-builder WORKDIR /src/api COPY api api/ COPY go.mod . diff --git a/Makefile b/Makefile index d26da686..a0f54847 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ all: setup init-dep lint test clean build run setup: @echo "> Setting up tools..." @test -x $(shell go env GOPATH)/bin/golangci-lint || \ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.53.3/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.53.3 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.58.1/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.53.3 .PHONY: init-dep init-dep: init-dep-ui init-dep-api diff --git a/api.Dockerfile b/api.Dockerfile index ad0369ca..cb04dfd6 100644 --- a/api.Dockerfile +++ b/api.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine as go-builder +FROM golang:1.22-alpine as go-builder WORKDIR /src/api diff --git a/go.mod b/go.mod index b9e8b6a6..e6da7445 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,13 @@ module github.com/caraml-dev/mlp -go 1.21 - -toolchain go1.22.5 +go 1.22 require ( cloud.google.com/go/storage v1.29.0 github.com/antihax/optional v1.0.0 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a github.com/avast/retry-go/v4 v4.6.0 + github.com/aws/aws-sdk-go-v2 v1.30.6-0.20240906182417-827d25db0048 github.com/aws/aws-sdk-go-v2/config v1.8.3 github.com/aws/aws-sdk-go-v2/service/s3 v1.61.2 github.com/gavv/httpexpect/v2 v2.15.0 @@ -58,7 +57,6 @@ require ( cloud.google.com/go/iam v0.8.0 // indirect github.com/ajg/form v1.5.1 // indirect github.com/andybalholm/brotli v1.0.4 // indirect - github.com/aws/aws-sdk-go-v2 v1.30.6-0.20240906182417-827d25db0048 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0 // indirect