File tree 3 files changed +86
-5
lines changed
3 files changed +86
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : fmtcheck
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ fmtcheck :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : harden runner
17
+ uses : step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
18
+ with :
19
+ egress-policy : block
20
+ disable-sudo : true
21
+ allowed-endpoints : >
22
+ github.com:443
23
+ api.github.com:443
24
+ proxy.github.com:443
25
+ proxy.golang.org:443
26
+ raw.githubusercontent.com:443
27
+ objects.githubusercontent.com:443
28
+ proxy.golang.org:443
29
+ - name : checkout code
30
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31
+ - name : setup go
32
+ uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
33
+ with :
34
+ go-version : 1.21
35
+ - name : check fmt
36
+ run : ' bash -c "diff -u <(echo -n) <(gofmt -d .)"'
Original file line number Diff line number Diff line change
1
+ name : lint
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ permissions :
10
+ contents : read
11
+ pull-requests : read # needed for only-new-issues option below
12
+
13
+ jobs :
14
+ lint :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : harden runner
18
+ uses : step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
19
+ with :
20
+ egress-policy : block
21
+ disable-sudo : true
22
+ allowed-endpoints : >
23
+ github.com:443
24
+ api.github.com:443
25
+ proxy.github.com:443
26
+ proxy.golang.org:443
27
+ raw.githubusercontent.com:443
28
+ objects.githubusercontent.com:443
29
+ proxy.golang.org:443
30
+ - name : checkout code
31
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
32
+ - name : setup go
33
+ uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
34
+ with :
35
+ go-version : 1.21
36
+ - name : lint
37
+ uses : golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
38
+ with :
39
+ version : v1.59.1
40
+ args : --timeout=5m0s --verbose
41
+ only-new-issues : true
Original file line number Diff line number Diff line change @@ -18,19 +18,20 @@ jobs:
18
18
runs-on : ${{ matrix.os }}
19
19
steps :
20
20
- name : harden runner
21
- uses : step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4 .1
21
+ uses : step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8 .1
22
22
with :
23
23
egress-policy : block
24
24
disable-sudo : true
25
25
allowed-endpoints : >
26
26
github.com:443
27
27
api.github.com:443
28
28
proxy.github.com:443
29
+ proxy.golang.org:443
29
30
raw.githubusercontent.com:443
30
31
objects.githubusercontent.com:443
31
32
proxy.golang.org:443
32
33
- name : checkout code
33
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
34
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
34
35
- name : setup go
35
36
uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
36
37
with :
@@ -47,19 +48,22 @@ jobs:
47
48
runs-on : ${{ matrix.os }}
48
49
steps :
49
50
- name : harden runner
50
- uses : step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4 .1
51
+ uses : step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8 .1
51
52
with :
52
53
egress-policy : audit
53
- disable-sudo : false
54
+ disable-sudo : true
54
55
allowed-endpoints : >
55
56
github.com:443
56
57
api.github.com:443
57
58
proxy.github.com:443
59
+ proxy.golang.org:443
58
60
raw.githubusercontent.com:443
59
61
objects.githubusercontent.com:443
60
62
proxy.golang.org:443
63
+ storage.googleapis.com:443
64
+ *.docker.io:443
61
65
- name : checkout code
62
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
66
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
63
67
- name : setup go
64
68
uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
65
69
with :
You can’t perform that action at this time.
0 commit comments