-
Notifications
You must be signed in to change notification settings - Fork 12
93 lines (82 loc) · 2.07 KB
/
ci.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
merge_group:
pull_request:
paths-ignore:
- 'DCO'
- 'LICENSE'
- 'README.md'
branches:
- "main"
- "v**"
workflow_dispatch:
jobs:
static-security-analysis:
runs-on: ubuntu-22.04
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -exclude-dir e2etest -severity medium ./...
- name: Golang Vulncheck
uses: Templum/[email protected]
with:
skip-upload: true
commitlint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
unit-tests:
runs-on: ubuntu-22.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Unit Tests
run: |
make test
- name: Lint
run: |
ENV=host make lint
make bumplicense
go mod tidy
make manifests
make checkuncommitted
build-test-images:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
steps:
- name: Code checkout
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
- name: Build and export the image
uses: docker/build-push-action@v4
with:
context: .
tags: quay.io/metallb/frrk8s:dev-amd64
file: Dockerfile
outputs: type=docker,dest=/tmp/frrk8s.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Upload frrk8s artifact
uses: actions/upload-artifact@v3
with:
retention-days: 1
name: image-tar-frrk8s
path: /tmp/frrk8s.tar