File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches-ignore : [ main ]
6
+
7
+
8
+ env :
9
+ GO_VERSION : ' 1.24'
10
+ GOLANGCI_LINT_VERSION : ' v2.1'
11
+
12
+ jobs : # example from https://github.com/golangci/golangci-lint-action/tree/main
13
+ detect-modules :
14
+ runs-on : ubuntu-latest
15
+ outputs :
16
+ modules : ${{ steps.set-modules.outputs.modules }}
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - uses : actions/setup-go@v5
20
+ with :
21
+ go-version : ${{ env.GO_VERSION }}
22
+ - id : set-modules
23
+ run : echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
24
+
25
+ golangci-lint :
26
+ needs : detect-modules
27
+ runs-on : ubuntu-latest
28
+ strategy :
29
+ matrix :
30
+ modules : ${{ fromJSON(needs.detect-modules.outputs.modules) }}
31
+ steps :
32
+ - uses : actions/checkout@v4
33
+ - uses : actions/setup-go@v5
34
+ with :
35
+ go-version : ${{ env.GO_VERSION }}
36
+ - name : golangci-lint ${{ matrix.modules }}
37
+ uses : golangci/golangci-lint-action@v8
38
+ with :
39
+ version : ${{ env.GOLANGCI_LINT_VERSION }}
40
+ working-directory : ${{ matrix.modules }}
You can’t perform that action at this time.
0 commit comments