Skip to content

Commit d859f84

Browse files
authored
Merge pull request #954 from mackerelio/workflow-sha-pinning
update CI
2 parents eed396c + fbb8301 commit d859f84

File tree

4 files changed

+47
-28
lines changed

4 files changed

+47
-28
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1919

20-
- uses: mackerelio/mackerel-create-release-pull-request-action@main
20+
- uses: mackerelio/mackerel-create-release-pull-request-action@c30e6538510d81ac7acb49cbadd7a6d15162006d # v0.0.1
2121
id: start
2222
with:
2323
github_token: ${{ secrets.MACKERELBOT_GITHUB_TOKEN }}
@@ -26,7 +26,7 @@ jobs:
2626
version_go_file_path: mackerel-check.go
2727
ignore_update_program_files: "true"
2828

29-
- uses: mackerelio/mackerel-create-release-pull-request-action@main
29+
- uses: mackerelio/mackerel-create-release-pull-request-action@c30e6538510d81ac7acb49cbadd7a6d15162006d # v0.0.1
3030
with:
3131
github_token: ${{ secrets.MACKERELBOT_GITHUB_TOKEN }}
3232
finished: "true"

.github/workflows/test.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@ env:
1212
DEBIAN_FRONTEND: noninteractive
1313
jobs:
1414
lint:
15-
uses: mackerelio/workflows/.github/workflows/go-lint.yml@c7e130d3908894f18068ca4a877e80539b535881 # v1.5.0
15+
uses: mackerelio/workflows/.github/workflows/go-lint.yml@7653987676cc233af59a390d142b5cf6e65a526f # v1.6.0
1616
test:
17-
uses: mackerelio/workflows/.github/workflows/go-test.yml@c7e130d3908894f18068ca4a877e80539b535881 # v1.5.0
17+
uses: mackerelio/workflows/.github/workflows/go-test.yml@7653987676cc233af59a390d142b5cf6e65a526f # v1.6.0
18+
with:
19+
pre: |
20+
echo "GOTOOLCHAIN=auto" >> $GITHUB_ENV
1821
test-linux:
19-
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@c7e130d3908894f18068ca4a877e80539b535881 # v1.5.0
22+
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@7653987676cc233af59a390d142b5cf6e65a526f # v1.6.0
2023
with:
2124
run: |
25+
export GOTOOLCHAIN=auto
2226
./test.bash
2327
make testconvention
2428
os-versions: '["ubuntu-24.04"]'
2529
test-windows:
26-
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@c7e130d3908894f18068ca4a877e80539b535881 # v1.5.0
30+
uses: mackerelio/workflows/.github/workflows/setup-go-matrix.yml@7653987676cc233af59a390d142b5cf6e65a526f # v1.6.0
2731
with:
2832
run: |
33+
export GOTOOLCHAIN=auto
2934
go build -o check-log/check-log.exe ./check-log
3035
go build -o check-procs/check-procs.exe ./check-procs
3136
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
@@ -58,7 +63,7 @@ jobs:
5863
with:
5964
fetch-depth: 0
6065
- run: make clean build rpm deb
61-
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
66+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6267
with:
6368
name: linux-build-artifacts
6469
path: |
@@ -70,17 +75,17 @@ jobs:
7075
runs-on: ubuntu-latest
7176
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
7277
steps:
73-
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
78+
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
7479
with:
7580
name: linux-build-artifacts
7681
path: artifacts/
77-
- uses: mackerelio/staging-release-update-action@main
82+
- uses: mackerelio/staging-release-update-action@bc0e3a9f7bd0d890dc044592a798bc307bacc956 # v0.0.1
7883
if: github.ref == 'refs/heads/master'
7984
with:
8085
directory: artifacts/
8186
github-token: ${{ secrets.GITHUB_TOKEN }}
8287
tag: staging
83-
- uses: mackerelio/create-release-action@main
88+
- uses: mackerelio/create-release-action@5af34070474b72efdb3f5057e50d2f3836453c56 # v0.0.4
8489
if: startsWith(github.ref, 'refs/tags/v')
8590
with:
8691
directory: artifacts/

.golangci.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
1+
version: "2"
12
linters:
2-
# Detected a number of cases that could not be handled after the switchover,
3-
# TODO remove this rule.
43
disable:
54
- errcheck
65
- staticcheck
7-
linters-settings:
8-
govet:
9-
enable-all: true
10-
disable:
11-
# Detected a number of cases that could not be handled after the switchover,
12-
# TODO remove this rule.
13-
- fieldalignment
14-
- shadow
15-
issues:
16-
exclude-rules:
17-
- path: _test\.go
18-
linters:
19-
- errcheck
20-
- staticcheck
21-
- ineffassign
6+
settings:
7+
govet:
8+
disable:
9+
- fieldalignment
10+
- shadow
11+
enable-all: true
12+
exclusions:
13+
generated: lax
14+
presets:
15+
- comments
16+
- common-false-positives
17+
- legacy
18+
- std-error-handling
19+
rules:
20+
- linters:
21+
- errcheck
22+
- ineffassign
23+
- staticcheck
24+
path: _test\.go
25+
paths:
26+
- third_party$
27+
- builtin$
28+
- examples$
29+
formatters:
30+
exclusions:
31+
generated: lax
32+
paths:
33+
- third_party$
34+
- builtin$
35+
- examples$

check-smtp/lib/check-smtp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func makeConn(host, port string, timeout int, isSMTPS bool, tlsConfig *tls.Confi
3838
if isSMTPS {
3939
return tls.DialWithDialer(&d, "tcp", fmt.Sprintf("%s:%s", host, port), tlsConfig)
4040
}
41-
return d.Dial("tcp", fmt.Sprintf("%s:%s", host, port))
41+
return d.Dial("tcp", net.JoinHostPort(host, port))
4242
}
4343

4444
func run(args []string) *checkers.Checker {

0 commit comments

Comments
 (0)