-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (52 loc) · 1.68 KB
/
sca.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
name: static
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
permissions:
contents: read
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
wget -q https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz
tar -xvf shellcheck-stable.linux.x86_64.tar.xz
shellcheck-stable/shellcheck -V; find . -name '*.sh' -print -exec sha256sum {} \;; find . -type f \( -name "*.sh" \) -print -exec shellcheck-stable/shellcheck -a -s bash -S warning -f gcc {} \;;
shell: bash
hadolint:
runs-on: ubuntu-latest
name: Hadolint
steps:
- uses: actions/checkout@v4
- run: wget -q https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 -O hadolint; chmod +x hadolint ; find . -type f \( -name "Dockerfile*" \) -print0 | xargs -n 1 -0 ./hadolint ;
gofmt-imports:
runs-on: ubuntu-latest
name: Go Fmt and Go Import
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: |
go install golang.org/x/tools/cmd/[email protected] && goimports -l . && gofmt -l .
shell: bash
golangci:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
name: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: golangci-lint
run: |
go install github.com/golangci/golangci-lint/cmd/[email protected]
make golangci-lint
shell: bash