change minimum go version to 1.16, add multiplatform docker image

This commit is contained in:
Matthew Penner 2021-07-12 11:06:22 -06:00
parent 29b2d6826a
commit f422081695
7 changed files with 17 additions and 14 deletions

View File

@ -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 }}

View File

@ -1,9 +1,11 @@
name: CodeQL
on:
push:
branches: [ develop ]
branches:
- develop
pull_request:
branches: [ develop ]
branches:
- develop
schedule:
- cron: '0 9 * * 4'
jobs:

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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" ]

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/pterodactyl/wings
go 1.14
go 1.16
require (
emperror.dev/errors v0.8.0