From f42208169501d292654b2bf8b1372cab36e6ca4b Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 12 Jul 2021 11:06:22 -0600 Subject: [PATCH] change minimum go version to 1.16, add multiplatform docker image --- .github/FUNDING.yml | 4 ++-- .github/workflows/build-test.yml | 8 ++++---- .github/workflows/codeql-analysis.yml | 6 ++++-- .github/workflows/docker.yml | 5 +++-- .github/workflows/release.yml | 2 +- Dockerfile | 4 ++-- go.mod | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 985087d..c5d0cb6 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -github: [DaneEveritt] -custom: ["https://paypal.me/PterodactylSoftware"] +github: [ DaneEveritt ] +custom: [ "https://paypal.me/PterodactylSoftware" ] diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 3d49321..bf33b90 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -2,17 +2,17 @@ name: Run Tests on: push: branches: - - 'develop' + - develop pull_request: branches: - - 'develop' + - develop jobs: build: strategy: fail-fast: false matrix: os: [ ubuntu-20.04 ] - go: [ '^1.15', '^1.16' ] + go: [ '^1.16' ] goos: [ linux ] goarch: [ amd64, arm64 ] runs-on: ${{ matrix.os }} @@ -60,7 +60,7 @@ jobs: run: go test ./... - name: Upload Artifact uses: actions/upload-artifact@v2 - if: ${{ matrix.go == '^1.15' && (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') }} + if: ${{ matrix.go == '^1.16' && (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') }} with: name: wings_${{ matrix.goos }}_${{ matrix.goarch }} path: build/wings_${{ matrix.goos }}_${{ matrix.goarch }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 18e9158..1cc786d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,9 +1,11 @@ name: CodeQL on: push: - branches: [ develop ] + branches: + - develop pull_request: - branches: [ develop ] + branches: + - develop schedule: - cron: '0 9 * * 4' jobs: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 04f8c53..a36e288 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,8 +2,7 @@ name: Publish Docker Image on: push: branches: - - 'develop' - + - develop tags: - 'v*' jobs: @@ -44,6 +43,7 @@ jobs: build-args: | VERSION=${{ steps.build_info.outputs.version_tag }} labels: ${{ steps.docker_meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.docker_meta.outputs.tags }} - name: Release Development Build @@ -53,5 +53,6 @@ jobs: build-args: | VERSION=dev-${{ steps.build_info.outputs.short_sha }} labels: ${{ steps.docker_meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd60581..658be6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '^1.15' + go-version: '^1.16' - name: Build env: REF: ${{ github.ref }} diff --git a/Dockerfile b/Dockerfile index bedf579..0d71391 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1 (Build) -FROM golang:1.15-alpine3.12 AS builder +FROM --platform=$BUILDPLATFORM golang:1.16-alpine3.13 AS builder ARG VERSION RUN apk add --update --no-cache git make upx @@ -19,4 +19,4 @@ RUN upx wings FROM busybox:1.33.0 RUN echo "ID=\"busybox\"" > /etc/os-release COPY --from=builder /app/wings /usr/bin/ -CMD [ "wings", "--config", "/etc/pterodactyl/config.yml" ] +CMD [ "/usr/bin/wings", "--config", "/etc/pterodactyl/config.yml" ] diff --git a/go.mod b/go.mod index 7278b33..bfb0f7d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/pterodactyl/wings -go 1.14 +go 1.16 require ( emperror.dev/errors v0.8.0