-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.12 KB
/
build.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
name: build
on:
push:
branches:
- "master"
tags:
- "!*"
pull_request:
branches:
- "*"
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Lint
uses: actions-contrib/golangci-lint@v1
with:
args: run -E golint -E bodyclose
build:
runs-on: ubuntu-latest
name: build
needs: linting
steps:
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.15
- name: Checkout
uses: actions/checkout@v1
- name: Get dependencies
run: make deps
- name: Build & Test
run: make build
- name: Validate release
uses: goreleaser/goreleaser-action@v1
with:
args: release --snapshot --skip-publish --rm-dist
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "whyeasy/grafana-snapshot-helper:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"