-
Notifications
You must be signed in to change notification settings - Fork 56
77 lines (70 loc) · 2.14 KB
/
prebuild.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
name: Pre-build
on:
push:
branches: ['main', 'release/**']
pull_request:
branches: ['main', 'release/**']
env:
GO_VERSION: '1.22.8'
GOLANGCI_LINT_VERSION: '1.61.0'
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
# check-dco will check the last 20 commits, but commit ranges
# exclude the start commit in the result, but need that commit
# in order to calculate the range. i.e. HEAD~20..HEAD includes
# 20 commits, but including HEAD it needs 21 commits.
fetch-depth: 21
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: wget https://github.com/google/flatbuffers/releases/download/v22.9.29/Linux.flatc.binary.g++-10.zip
- run: unzip Linux.flatc.binary.g++-10.zip
- run: ./scripts/install-check-tools.sh
- run: ./scripts/check-ltag.sh
- run: ./scripts/check-dco.sh
- run: PATH=$PATH:$(pwd) ./scripts/check-flatc.sh
git-secrets:
runs-on: ubuntu-20.04
steps:
- name: Pull latest awslabs/git-secrets repo
uses: actions/checkout@v4
with:
repository: awslabs/git-secrets
ref: 1.3.0
fetch-tags: true
path: git-secrets
- name: Install git secrets from source
run: sudo make install
working-directory: git-secrets
- uses: actions/checkout@v4
- name: Scan repository for git secrets
run: |
git secrets --register-aws
git secrets --scan-history
lint:
strategy:
matrix:
working_dir: ['.', 'cmd']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
version: v${{ env.GOLANGCI_LINT_VERSION }}
working-directory: ${{ matrix.working_dir }}
yamllint:
name: yamllint-lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: yamllint .
shellcheck:
runs-on: ubuntu-20.04
container: koalaman/shellcheck-alpine:v0.10.0
steps:
- uses: actions/checkout@v4
- run: shellcheck ./**/*.sh