Skip to content

Commit 4cd92d1

Browse files
committed
chore(ci): workflows: add shared workflows
1 parent 88d89dd commit 4cd92d1

File tree

5 files changed

+130
-0
lines changed

5 files changed

+130
-0
lines changed

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: daily

.github/workflows/go-ci.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Go CI
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '**.go'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.github/workflows/go-ci.yaml'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- '**.go'
18+
- 'go.mod'
19+
- 'go.sum'
20+
- '.github/workflows/go-ci.yaml'
21+
workflow_dispatch:
22+
23+
jobs:
24+
ci:
25+
uses: plexusone/.github/.github/workflows/go-ci.yaml@main

.github/workflows/go-lint.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Go Lint
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '**.go'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.golangci.yml'
13+
- '.github/workflows/go-lint.yaml'
14+
pull_request:
15+
branches:
16+
- main
17+
paths:
18+
- '**.go'
19+
- 'go.mod'
20+
- 'go.sum'
21+
- '.golangci.yml'
22+
- '.github/workflows/go-lint.yaml'
23+
workflow_dispatch:
24+
25+
jobs:
26+
lint:
27+
uses: plexusone/.github/.github/workflows/go-lint.yaml@main
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Go SAST (CodeQL)
2+
permissions:
3+
actions: read
4+
contents: read
5+
security-events: write
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- '**.go'
12+
- 'go.mod'
13+
- 'go.sum'
14+
- '.github/workflows/go-sast-codeql.yaml'
15+
pull_request:
16+
branches:
17+
- main
18+
paths:
19+
- '**.go'
20+
- 'go.mod'
21+
- 'go.sum'
22+
- '.github/workflows/go-sast-codeql.yaml'
23+
schedule:
24+
- cron: '0 6 * * 1'
25+
workflow_dispatch:
26+
27+
jobs:
28+
sast:
29+
uses: plexusone/.github/.github/workflows/go-sast-codeql.yaml@main

.golangci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: "2"
2+
run:
3+
go: "1.23"
4+
linters:
5+
enable:
6+
- dogsled
7+
- dupl
8+
- gosec
9+
- misspell
10+
- nakedret
11+
- staticcheck
12+
- unconvert
13+
- unparam
14+
- whitespace
15+
exclusions:
16+
generated: lax
17+
presets:
18+
- comments
19+
- common-false-positives
20+
- legacy
21+
- std-error-handling
22+
paths:
23+
- third_party$
24+
- builtin$
25+
- examples$
26+
settings:
27+
staticcheck:
28+
checks:
29+
- "-QF1008" # Disable the "could remove embedded field" check
30+
formatters:
31+
enable:
32+
- gofmt
33+
- goimports
34+
exclusions:
35+
generated: lax
36+
paths:
37+
- third_party$
38+
- builtin$
39+
- examples$

0 commit comments

Comments
 (0)