From ce1e54d8664b7e6938ee2dcd2a9dcb2cab9c72d0 Mon Sep 17 00:00:00 2001 From: Masayuki Morita Date: Sun, 18 Aug 2024 17:49:27 +0900 Subject: [PATCH] Update Go to v1.22 --- .go-version | 2 +- Dockerfile | 12 ++++++++++-- README.md | 2 +- go.mod | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.go-version b/.go-version index bc44934..71f7f51 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19 +1.22 diff --git a/Dockerfile b/Dockerfile index d4ccf70..1eed36f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ -FROM golang:1.19-alpine3.16 AS build-env +FROM golang:1.22-alpine3.20 AS build-env RUN apk --no-cache add make git + +# A workaround for a permission issue of git. +# Since UIDs are different between host and container, +# the .git directory is untrusted by default. +# We need to allow it explicitly. +# https://github.com/actions/checkout/issues/760 +RUN git config --global --add safe.directory /work + WORKDIR /work COPY go.mod go.sum ./ @@ -8,6 +16,6 @@ RUN go mod download COPY . . RUN make build -FROM alpine:3.16 +FROM alpine:3.20 RUN apk --no-cache add ca-certificates && update-ca-certificates COPY --from=build-env /work/bin/myaws /usr/local/bin/myaws diff --git a/README.md b/README.md index 39ee3e9..8098457 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ $ brew install minamijoyo/myaws/myaws or -If you have Go 1.19+ development environment: +If you have Go 1.22+ development environment: ```bash $ go install github.com/minamijoyo/myaws@latest diff --git a/go.mod b/go.mod index 0236cbd..4711e3b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/minamijoyo/myaws -go 1.19 +go 1.22 require ( github.com/aws/aws-sdk-go v1.38.39