mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +02:00
CI Overhaul (#83)
Multiple changes made to the CI workflow. Docker images are now built for AMD64, ARM64 and ARMv7 Docker images are now built for each release and published on docker hub Release workflow now successfully create release and upload assets Added ARM64 to list of binaries compiled during release
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Review & Build
|
||||
name: PR
|
||||
on:
|
||||
push:
|
||||
branches-ignore: master
|
||||
@@ -7,10 +7,10 @@ on:
|
||||
- master
|
||||
jobs:
|
||||
review:
|
||||
name: Review code
|
||||
name: Code Review
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Check suspicious constructs (1)
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
with:
|
||||
args: go get honnef.co/go/tools/cmd/staticcheck; staticcheck -checks all,-ST1003,-U1000,-ST1005 ./... # have to disable ST1003,U1000,ST1005 due to the generated code
|
||||
args: go get -u honnef.co/go/tools/cmd/staticcheck; staticcheck -checks all,-ST1003,-U1000,-ST1005 ./... # have to disable ST1003,U1000,ST1005 due to the generated code
|
||||
|
||||
- name: Check suspicious constructs (2)
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
@@ -51,27 +51,30 @@ jobs:
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
with:
|
||||
# TODO: remove `-exclude=G110` once https://github.com/go-bindata/go-bindata/pull/50 is merged and released
|
||||
args: go get github.com/securego/gosec/cmd/gosec; gosec -exclude=G110 ./... # https://github.com/securego/gosec
|
||||
args: go get -u github.com/securego/gosec/cmd/gosec; gosec -exclude=G110 ./... # https://github.com/securego/gosec
|
||||
|
||||
build:
|
||||
name: Build code
|
||||
name: Build wg-ui
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Clean out old builds from disk
|
||||
run: |
|
||||
df -h / && df -h /mnt
|
||||
sudo apt-get clean -qq
|
||||
sudo apt-get autoclean -qq
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h / && df -h /mnt
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-verison: '12.x'
|
||||
|
||||
- name: Install buildah
|
||||
run: |
|
||||
sudo apt-get install -qq -y software-properties-common
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -qq -y install buildah
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.14'
|
||||
|
||||
- name: Build the Docker image
|
||||
run: buildah bud --format=docker --layers -f Dockerfile .
|
||||
- name: Build binary
|
||||
run: make build
|
||||
|
||||
- name: Check binary
|
||||
run: file bin/wireguard-ui
|
||||
|
||||
- name: Cleanup
|
||||
run: rm -rf bin/
|
||||
|
||||
Reference in New Issue
Block a user