File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : golangci-lint
2
+ on : [pull_request]
3
+ jobs :
4
+ golangci-lint-dockerfile :
5
+ name : golangci-lint
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - name : Check out code into the Go module directory
9
+ uses : actions/checkout@v1
10
+ - name : golangci-lint
11
+ uses : ./
12
+ with :
13
+ github_token : ${{ secrets.github_token }}
14
+ flags : " ./testdata"
Original file line number Diff line number Diff line change 6
6
github_token :
7
7
description : ' GITHUB_TOKEN'
8
8
required : true
9
+ flags :
10
+ description : ' GolangCI command line flags'
11
+ required : false
9
12
runs :
10
13
using : ' docker'
11
14
image : ' Dockerfile'
Original file line number Diff line number Diff line change
1
+ // Package sample is used as test input for golangci action.
2
+ package sample
3
+
4
+ import (
5
+ "crypto/md5"
6
+ "encoding/hex"
7
+ )
8
+
9
+ // Hash~
10
+ func Hash (data string ) string {
11
+ h := md5 .New ()
12
+ h .Write ([]byte (data ))
13
+ return hex .EncodeToString (h .Sum (nil ))
14
+ }
You can’t perform that action at this time.
0 commit comments