mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-18 21:03:30 +02:00
Github actions & clean up to be able to do linting (#27)
* Github actions & clean up to be able to do linting * renamed user * pushing images to github packages * Fixed tags
This commit is contained in:
committed by
GitHub
parent
a127e67720
commit
b471f3dff5
@@ -0,0 +1,46 @@
|
||||
name: Go
|
||||
on:
|
||||
push:
|
||||
branches-ignore: master
|
||||
jobs:
|
||||
review:
|
||||
name: Review code
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: bindfs
|
||||
uses: "cedrickring/golang-action@1.4.1"
|
||||
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.4.1"
|
||||
with:
|
||||
args: go get -u golang.org/x/lint/golint; golint -set_exit_status main.go server.go config.go # ./... update to use package when https://github.com/go-bindata/go-bindata/pull/37 is merged
|
||||
- name: Check missing error check
|
||||
uses: "cedrickring/golang-action@1.4.1"
|
||||
with:
|
||||
args: go get -u github.com/kisielk/errcheck; errcheck ./...
|
||||
- name: Check suspicious constructs (1)
|
||||
uses: "cedrickring/golang-action@1.4.1"
|
||||
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
|
||||
- name: Check suspicious constructs (2)
|
||||
uses: "cedrickring/golang-action@1.4.1"
|
||||
with:
|
||||
args: go vet ./...
|
||||
- name: Check missing error check
|
||||
uses: "cedrickring/golang-action@1.4.1"
|
||||
with:
|
||||
args: go get github.com/securego/gosec/cmd/gosec; gosec ./... # https://github.com/securego/gosec
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Install buildah
|
||||
run: |
|
||||
sudo apt-get install -qq -y software-properties-common
|
||||
sudo add-apt-repository -y ppa:projectatomic/ppa
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -qq -y install buildah
|
||||
- name: Build the Docker image
|
||||
run: buildah bud --format=docker --layers -f Dockerfile .
|
||||
@@ -0,0 +1,20 @@
|
||||
name: Docker Image CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install buildah
|
||||
run: |
|
||||
sudo apt-get install -qq -y software-properties-common
|
||||
sudo add-apt-repository -y ppa:projectatomic/ppa
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -qq -y install buildah
|
||||
- name: Build & push the Docker image
|
||||
run: |
|
||||
buildah bud --format=docker --layers -t docker.pkg.github.com/EmbarkStudios/wireguard-ui/wireguard-ui:latest -t docker.pkg.github.com/EmbarkStudios/wireguard-ui/wireguard-ui:${GITHUB_SHA} -f Dockerfile .
|
||||
buildah push --creds embarkbot:${{ secrets.GITHUB_TOKEN }} --format=v2s2 docker.pkg.github.com/EmbarkStudios/wireguard-ui/wireguard-ui
|
||||
Reference in New Issue
Block a user