瀏覽代碼

use Go 1.16 for CI and Docker images

Nicola Murino 4 年之前
父節點
當前提交
41e1d9e68a
共有 5 個文件被更改,包括 11 次插入10 次删除
  1. 6 5
      .github/workflows/development.yml
  2. 1 1
      .github/workflows/release.yml
  3. 1 1
      Dockerfile
  4. 2 2
      Dockerfile.alpine
  5. 1 1
      README.md

+ 6 - 5
.github/workflows/development.yml

@@ -11,14 +11,14 @@ jobs:
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
     strategy:
       matrix:
       matrix:
-        go: [1.15]
+        go: [1.16]
         os: [ubuntu-latest, macos-latest]
         os: [ubuntu-latest, macos-latest]
         upload-coverage: [true]
         upload-coverage: [true]
         include:
         include:
-          #- go: 1.14
-          #  os: ubuntu-latest
-          #  upload-coverage: false
           - go: 1.15
           - go: 1.15
+            os: ubuntu-latest
+            upload-coverage: false
+          - go: 1.16
             os: windows-latest
             os: windows-latest
             upload-coverage: false
             upload-coverage: false
 
 
@@ -85,6 +85,7 @@ jobs:
         if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
         if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
         uses: crazy-max/ghaction-xgo@v1
         uses: crazy-max/ghaction-xgo@v1
         with:
         with:
+          go_version: 1.16.x
           dest: cross
           dest: cross
           prefix: sftpgo
           prefix: sftpgo
           targets: linux/arm64,linux/ppc64le
           targets: linux/arm64,linux/ppc64le
@@ -235,7 +236,7 @@ jobs:
       - name: Set up Go
       - name: Set up Go
         uses: actions/setup-go@v2
         uses: actions/setup-go@v2
         with:
         with:
-          go-version: 1.15
+          go-version: 1.16
 
 
       - name: Build
       - 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
         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

+ 1 - 1
.github/workflows/release.yml

@@ -143,7 +143,7 @@ jobs:
         if: ${{ matrix.os == 'ubuntu-latest' }}
         if: ${{ matrix.os == 'ubuntu-latest' }}
         uses: crazy-max/ghaction-xgo@v1
         uses: crazy-max/ghaction-xgo@v1
         with:
         with:
-          go-version: ${{ env.GO_VERSION }}
+          go_version: ${{ env.GO_VERSION }}
           dest: cross
           dest: cross
           prefix: sftpgo
           prefix: sftpgo
           targets: linux/arm64,linux/ppc64le
           targets: linux/arm64,linux/ppc64le

+ 1 - 1
Dockerfile

@@ -1,4 +1,4 @@
-FROM golang:1.15-buster as builder
+FROM golang:1.16-buster as builder
 
 
 ENV GOFLAGS="-mod=readonly"
 ENV GOFLAGS="-mod=readonly"
 
 

+ 2 - 2
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"
 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
     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
 # Set to "true" to install the optional git and rsync dependencies
 ARG INSTALL_OPTIONAL_PACKAGES=false
 ARG INSTALL_OPTIONAL_PACKAGES=false

+ 1 - 1
README.md

@@ -59,7 +59,7 @@ SFTPGo is developed and tested on Linux. After each commit, the code is automati
 
 
 ## Requirements
 ## 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.
 - 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.
 - The SQL server is optional: you can choose to use an embedded bolt database as key/value store or an in memory data provider.