Work on reoccurring build errors (#123)

* bump golang-action to 1.7.0

* set action-gh-release to v1

* move away from distroless to alpine

* bump alpine to latest to align with Dockerfile

* making sure path is gopath is correct

* separate cache directories per build-job

* go mod tidy

* update go dependencies
This commit is contained in:
Markus Viitamäki
2021-05-10 12:28:51 +02:00
committed by GitHub
parent a537adbcaf
commit 0cdaa2ae05
7 changed files with 78 additions and 47 deletions
+7 -8
View File
@@ -24,32 +24,32 @@ jobs:
npm run --prefix ui build
- name: Get and install bindfs
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
args: go get -u github.com/go-bindata/go-bindata/... && go get -u github.com/elazarl/go-bindata-assetfs/... && go-bindata-assetfs -prefix ui/dist ui/dist
- name: Check styling error
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
args: go get -u golang.org/x/lint/golint; golint -set_exit_status main.go server.go config.go
- name: Check missing error check
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
args: go get -u github.com/kisielk/errcheck; errcheck ./...
- name: Check suspicious constructs (1)
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
args: go get -u honnef.co/go/tools/cmd/staticcheck; staticcheck -checks all,-ST1003,-U1000,-ST1005,-SA9002 ./... # have to disable ST1003,U1000,ST1005 due to the generated code
- name: Check suspicious constructs (2)
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
args: go vet ./...
- name: Check security issues with gosec
uses: "cedrickring/golang-action@1.6.0"
uses: "cedrickring/golang-action@1.7.0"
with:
# TODO: remove `-exclude=G110` once https://github.com/go-bindata/go-bindata/pull/50 is merged and released
args: go get -u github.com/securego/gosec/cmd/gosec; gosec -exclude=G110 ./... # https://github.com/securego/gosec
@@ -65,12 +65,11 @@ jobs:
uses: actions/setup-node@v2
with:
node-verison: 12
check-latest: true
- name: Setup Go
uses: actions/setup-go@v2
- name: Build wg-ui
- name: Build binary
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make build
+6 -6
View File
@@ -67,7 +67,7 @@ jobs:
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
path: /tmp/.buildx-cache-userspace
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
@@ -80,8 +80,8 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: embarkstudios/wireguard-ui:userspace
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
cache-from: type=local,src=/tmp/.buildx-cache-userspace
cache-to: type=local,dest=/tmp/.buildx-cache-userspace
docker-debug:
name: Docker Debug
@@ -106,7 +106,7 @@ jobs:
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
path: /tmp/.buildx-cache-debug
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
@@ -119,5 +119,5 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: embarkstudios/wireguard-ui:debug
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
cache-from: type=local,src=/tmp/.buildx-cache-debug
cache-to: type=local,dest=/tmp/.buildx-cache-debug
+1 -1
View File
@@ -125,7 +125,7 @@ jobs:
ls -lah wg-ui*
- name: GitHub Release
uses: softprops/action-gh-release@master
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: