-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (102 loc) · 2.49 KB
/
main.yml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Go
on:
push:
branches:
- main
- release-v*
- release/v*
paths-ignore:
- "docs/**"
- "**.md"
- "**.h"
- "**.c"
- "**.ppt"
- "CODEOWNERS"
- "OWNERS"
pull_request:
branches:
- main
- release-v*
- release/v*
paths-ignore:
- "docs/**"
- "**.md"
- "CODEOWNERS"
- "OWNERS"
env:
CI_WAIT_FOR_OK_SECONDS: 60
CI_MAX_ITERATIONS_THRESHOLD: 60
CI_CLIENT_CONCURRENT_CONNECTIONS: 1
CI_MAX_WAIT_FOR_POD_TIME_SECONDS: 60
CI_MIN_SUCCESS_THRESHOLD: 1
FSM_HUMAN_DEBUG_LOG: true
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ShellCheck
run: shellcheck -x $(find . -name '*.sh')
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
args: --allow-parallel-runners=true --tests=false --timeout=5m
codegen:
name: Codegen
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: go mod tidy
run: make -f Makefile.cli.mk go-mod-tidy
build:
name: Go build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Go Build
run: make -f Makefile.cli.mk build-cli
images:
name: Docker Images
runs-on: ubuntu-latest
if: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')) && github.event_name == 'push' }}
env:
CTR_REGISTRY: ${{ secrets.RELEASE_REGISTRY }}
CTR_TAG: latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.RELEASE_DOCKER_USER }}
password: ${{ secrets.RELEASE_DOCKER_PASS }}
- name: Push images with "latest" tag
env:
CTR_TAG: latest
run: make docker-build-cross