From ea8e73d546a14d823424638207b1ba41bb86dd29 Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Tue, 30 Jul 2024 05:29:50 +0800 Subject: [PATCH] chore: update Golang to 1.22.5 (#48) Because - We don't want to use environment variables for the Golang vesion. This commit - Upgrades the Golang version to 1.22.5. - Removes unnecessary environment variables. --- .env | 2 +- .github/workflows/golangci-lint.yml | 4 ++-- .github/workflows/images.yml | 2 -- Dockerfile | 5 ++--- Dockerfile.dev | 3 +-- go.mod | 4 +--- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.env b/.env index f39e80a..46d48e6 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # version -GOLANG_VERSION=1.22 +GOLANG_VERSION=1.22.5 K6_VERSION=0.42.0 # service diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 12fad5e..369a9b1 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,7 +18,7 @@ jobs: go-version: '1.21' cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.54 + version: v1.59 args: --timeout=10m diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index f8821cf..6e3f382 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -36,7 +36,6 @@ jobs: push: true build-args: | SERVICE_NAME=artifact-backend - GOLANG_VERSION=${{ env.GOLANG_VERSION }} tags: instill/artifact-backend:latest cache-from: type=registry,ref=instill/artifact-backend:buildcache cache-to: type=registry,ref=instill/artifact-backend:buildcache,mode=max @@ -61,7 +60,6 @@ jobs: push: true build-args: | SERVICE_NAME=artifact-backend - GOLANG_VERSION=${{ env.GOLANG_VERSION }} tags: instill/artifact-backend:${{steps.set_version.outputs.no_v_tag}} cache-from: type=registry,ref=instill/artifact-backend:buildcache cache-to: type=registry,ref=instill/artifact-backend:buildcache,mode=max diff --git a/Dockerfile b/Dockerfile index cce3d88..d97cc00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -ARG GOLANG_VERSION -FROM --platform=$TARGETPLATFORM golang:${GOLANG_VERSION} AS build +FROM --platform=$TARGETPLATFORM golang:1.22.5 AS build WORKDIR /src @@ -21,7 +20,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \ GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o /${SERVICE_NAME}-migrate ./cmd/migration -FROM golang:${GOLANG_VERSION} +FROM golang:1.22.5 USER nobody:nogroup diff --git a/Dockerfile.dev b/Dockerfile.dev index 3b5b6f4..6ca4f9f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,5 +1,4 @@ -ARG GOLANG_VERSION -FROM golang:${GOLANG_VERSION} +FROM golang:1.22.5 ARG SERVICE_NAME diff --git a/go.mod b/go.mod index a07a547..2fb759e 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/instill-ai/artifact-backend -go 1.22.3 - -toolchain go1.22.5 +go 1.22.5 require ( github.com/frankban/quicktest v1.14.6