Skip to content

Commit 3e24bea

Browse files
authored
Merge pull request #16 from jaypipes/lint
update GH actions
2 parents c0c72de + b215c88 commit 3e24bea

File tree

3 files changed

+86
-5
lines changed

3 files changed

+86
-5
lines changed

.github/workflows/fmtcheck.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 .)"'

.github/workflows/lint.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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

.github/workflows/gate-tests.yml renamed to .github/workflows/test.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
steps:
2020
- name: harden runner
21-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
21+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
2222
with:
2323
egress-policy: block
2424
disable-sudo: true
2525
allowed-endpoints: >
2626
github.com:443
2727
api.github.com:443
2828
proxy.github.com:443
29+
proxy.golang.org:443
2930
raw.githubusercontent.com:443
3031
objects.githubusercontent.com:443
3132
proxy.golang.org:443
3233
- name: checkout code
33-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
34+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3435
- name: setup go
3536
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
3637
with:
@@ -47,19 +48,22 @@ jobs:
4748
runs-on: ${{ matrix.os }}
4849
steps:
4950
- name: harden runner
50-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
51+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
5152
with:
5253
egress-policy: audit
53-
disable-sudo: false
54+
disable-sudo: true
5455
allowed-endpoints: >
5556
github.com:443
5657
api.github.com:443
5758
proxy.github.com:443
59+
proxy.golang.org:443
5860
raw.githubusercontent.com:443
5961
objects.githubusercontent.com:443
6062
proxy.golang.org:443
63+
storage.googleapis.com:443
64+
*.docker.io:443
6165
- name: checkout code
62-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
66+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
6367
- name: setup go
6468
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
6569
with:

0 commit comments

Comments
 (0)