From b2d93d50c5bd6f7336207ea6f4ae87e40f6c86ef Mon Sep 17 00:00:00 2001 From: Kyle Sanderson Date: Tue, 28 Feb 2023 14:29:51 -0800 Subject: [PATCH] chore(deps): update Go to 1.20 (#726) * chore(github): Update to go 1.20 * chore(go): enable language functionality in 1.20 * build: update go versions and rename dockerfile.ci --- .dockerignore | 2 +- .github/workflows/release.yml | 10 ++++++---- Dockerfile | 2 +- Dockerfile.ci => ci.Dockerfile | 2 +- go.mod | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) rename Dockerfile.ci => ci.Dockerfile (95%) diff --git a/.dockerignore b/.dockerignore index b67d1be..6b68690 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,7 +6,7 @@ node_modules/ config.toml .goreleaser.yml Dockerfile -Dockerfile.ci +ci.Dockerfile docker-compose.yml README.md bin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b29f86a..8225e89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,10 +58,11 @@ jobs: name: web-build path: web/build +# 1.20 is the last version to support Windows < 10, Server < 2016, and MacOS < 1.15. - name: Set up Go uses: actions/setup-go@v3 with: - go-version: '1.19.2' + go-version: '1.20.1' cache: true - name: Run GoReleaser build @@ -96,10 +97,11 @@ jobs: name: web-build path: web/build +# 1.20 is the last version to support Windows < 10, Server < 2016, and MacOS < 1.15. - name: Set up Go uses: actions/setup-go@v3 with: - go-version: '1.19.2' + go-version: '1.20.1' cache: true - name: Run GoReleaser build and publish tags @@ -157,7 +159,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: ./Dockerfile.ci + file: ./ci.Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 push: ${{ github.repository_owner == 'autobrr' }} tags: ${{ steps.meta.outputs.tags }} @@ -167,4 +169,4 @@ jobs: VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} REVISION=${{ github.event.pull_request.head.sha }} - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 40a8a8e..b381fe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY web . RUN yarn build # build app -FROM golang:1.19-alpine3.16 AS app-builder +FROM golang:1.20-alpine3.16 AS app-builder ARG VERSION=dev ARG REVISION=dev diff --git a/Dockerfile.ci b/ci.Dockerfile similarity index 95% rename from Dockerfile.ci rename to ci.Dockerfile index ff31bf8..f48b307 100644 --- a/Dockerfile.ci +++ b/ci.Dockerfile @@ -1,5 +1,5 @@ # build app -FROM golang:1.19-alpine3.16 AS app-builder +FROM golang:1.20-alpine3.16 AS app-builder ARG VERSION=dev ARG REVISION=dev diff --git a/go.mod b/go.mod index b7be319..f450b1c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/autobrr/autobrr -go 1.19 +go 1.20 require ( github.com/Masterminds/sprig/v3 v3.2.2