forked from metacontroller/metacontroller
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (68 loc) · 2.13 KB
/
static.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: Static Checks
on: [pull_request]
jobs:
golangci-lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
args: --timeout 10m --enable errorlint,gofmt,goimports,gosec,whitespace,bodyclose,dogsled,durationcheck,errorlint,exhaustive,exportloopref,goconst,gocritic,gosec,ifshort,importas,misspell,nilerr --exclude=G108
docker-linters:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
install-only: true
- name: build binary
run: make build
- name: Build local image
run: docker build -t localhost/metacontroller:lint-${{ github.sha }} .
- name: Lint docker image
uses: Azure/container-scan@v0
env:
# See https://github.com/Azure/container-scan/issues/146
DOCKLE_HOST: "unix:///var/run/docker.sock"
with:
image-name: localhost/metacontroller:lint-${{ github.sha }}
documentation-test:
runs-on: ubuntu-22.04
container:
image: "michaelfbryan/mdbook-docker-image:latest"
steps:
- uses: actions/checkout@v3
- name: Build mdbook
run: |
cd docs
mdbook build
nancy-dependency-scan:
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x in order to write go.list file
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: WriteGoList
run: go list -deps -json ./... > go.list
- name: Nancy
uses: sonatype-nexus-community/nancy-github-action@main