From 41e1d9e68a8b860acc61fc314c4d7907d676e9b2 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 21 Feb 2021 12:01:37 +0100 Subject: [PATCH] use Go 1.16 for CI and Docker images --- .github/workflows/development.yml | 11 ++++++----- .github/workflows/release.yml | 2 +- Dockerfile | 2 +- Dockerfile.alpine | 4 ++-- README.md | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 46bd4299..0bb85db0 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -11,14 +11,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - go: [1.15] + go: [1.16] os: [ubuntu-latest, macos-latest] upload-coverage: [true] include: - #- go: 1.14 - # os: ubuntu-latest - # upload-coverage: false - go: 1.15 + os: ubuntu-latest + upload-coverage: false + - go: 1.16 os: windows-latest upload-coverage: false @@ -85,6 +85,7 @@ jobs: if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }} uses: crazy-max/ghaction-xgo@v1 with: + go_version: 1.16.x dest: cross prefix: sftpgo targets: linux/arm64,linux/ppc64le @@ -235,7 +236,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Build run: go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b30cef5d..bec69078 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,7 +143,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} uses: crazy-max/ghaction-xgo@v1 with: - go-version: ${{ env.GO_VERSION }} + go_version: ${{ env.GO_VERSION }} dest: cross prefix: sftpgo targets: linux/arm64,linux/ppc64le diff --git a/Dockerfile b/Dockerfile index c48aa94f..794bdc25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15-buster as builder +FROM golang:1.16-buster as builder ENV GOFLAGS="-mod=readonly" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index cdd63554..05dba742 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM golang:1.15-alpine3.12 AS builder +FROM golang:1.16-alpine3.13 AS builder ENV GOFLAGS="-mod=readonly" @@ -26,7 +26,7 @@ RUN set -xe && \ go build $(if [ -n "${FEATURES}" ]; then echo "-tags ${FEATURES}"; fi) -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=${COMMIT_SHA} -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -v -o sftpgo -FROM alpine:3.12 +FROM alpine:3.13 # Set to "true" to install the optional git and rsync dependencies ARG INSTALL_OPTIONAL_PACKAGES=false diff --git a/README.md b/README.md index c767e4d8..74c93ccd 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ SFTPGo is developed and tested on Linux. After each commit, the code is automati ## Requirements -- Go 1.15 or higher as build only dependency. +- Go as build only dependency. We support the Go version(s) used in [continuous integration workflows](./tree/main/.github/workflows). - A suitable SQL server to use as data provider: PostgreSQL 9.4+ or MySQL 5.6+ or SQLite 3.x. - The SQL server is optional: you can choose to use an embedded bolt database as key/value store or an in memory data provider.