Skip to content

Commit d03f80f

Browse files
committed
chore: update workflows
1 parent 200b05c commit d03f80f

5 files changed

Lines changed: 42 additions & 56 deletions

File tree

.github/workflows/checks.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ on:
55
branches:
66
- main
77
pull_request:
8-
permissions:
9-
contents: read
10-
pull-requests: read
8+
9+
permissions: {}
10+
1111
env:
1212
CGO_ENABLED: 0
13-
GOLANGCI_LINT_VERSION: v2.9.0
14-
SHELLCHECK_SCRIPTS: ./*.sh
13+
GOLANGCI_LINT_VERSION: v2.12
14+
1515
jobs:
1616
go-lint-checks:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
19+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2020
with:
2121
persist-credentials: false
2222
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
@@ -29,17 +29,14 @@ jobs:
2929
go-mod-checks:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
32+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3333
with:
3434
persist-credentials: false
3535
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3636
with:
3737
go-version-file: go.mod
3838
- name: Check if go.mod is tidy
39-
run: |
40-
go mod tidy
41-
git diff --exit-code go.mod go.sum ||
42-
(echo "::error::go.mod and go.sum need to be tidy" && exit 1)
39+
run: go mod tidy --diff
4340
- name: Check if vendor directory is up to date
4441
run: |
4542
go mod vendor

.github/workflows/go-cross.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches:
55
- main
66
pull_request:
7-
permissions:
8-
contents: read
9-
pull-requests: read
7+
8+
permissions: {}
9+
1010
jobs:
1111
cross:
1212
name: Build on ${{ matrix.os }} with Go ${{ matrix.go-version }}
@@ -25,7 +25,7 @@ jobs:
2525
- windows-latest
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
28+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2929
with:
3030
persist-credentials: false
3131
- name: Set up Go

.github/workflows/release.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on:
44
push:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+"
7-
permissions:
8-
contents: read
7+
8+
permissions: {}
9+
910
env:
1011
DOCKER_PLATFORMS: linux/amd64, linux/arm64, windows/amd64
1112
DOCKER_IMAGE_BASENAME: ghcr.io/${{ github.repository_owner }}
@@ -31,7 +32,7 @@ jobs:
3132
- linux
3233
- windows
3334
steps:
34-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
35+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3536
with:
3637
persist-credentials: false
3738
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
@@ -50,7 +51,7 @@ jobs:
5051
- name: Display ${{ matrix.app }} artifacts
5152
run: tree /tmp/dist
5253
- name: Store ${{ matrix.app }} artifacts
53-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
54+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5455
with:
5556
name: ${{ matrix.app }}-${{ matrix.go-os }}-${{ matrix.go-arch }}
5657
path: /tmp/dist
@@ -69,11 +70,11 @@ jobs:
6970
contents: read
7071
packages: write # Allow docker/build-push-action to publish to GitHub Container Registry
7172
steps:
72-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
73+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7374
with:
7475
persist-credentials: false
7576
- name: Download ${{ matrix.app }} artifacts
76-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
77+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
7778
with:
7879
merge-multiple: true
7980
path: /tmp/dist
@@ -82,7 +83,7 @@ jobs:
8283
run: tree /tmp/dist
8384
- name: Docker meta
8485
id: meta
85-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
86+
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
8687
with:
8788
images: ${{ env.DOCKER_IMAGE_BASENAME }}/${{ matrix.app }}
8889
# generate Docker tags based on the following events/attributes
@@ -93,9 +94,9 @@ jobs:
9394
type=sha
9495
type=raw,value=latest
9596
- name: Set up QEMU
96-
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
97+
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
9798
- name: Set up Docker Buildx
98-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
99+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
99100
- name: Login to GitHub Container Registry
100101
run: printenv GITHUB_TOKEN | docker login -u "$GITHUB_ACTOR" --password-stdin ghcr.io
101102
env:
@@ -140,7 +141,7 @@ jobs:
140141
runs-on: ubuntu-latest
141142
steps:
142143
- name: Download build artifacts
143-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
144+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
144145
- name: Display build artifacts
145146
run: tree .
146147
- name: Create release

.github/workflows/tests.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches:
55
- main
66
pull_request:
7-
permissions:
8-
contents: read
9-
pull-requests: read
7+
8+
permissions: {}
9+
1010
jobs:
1111
certbot-linux:
1212
name: Run Certbot tests on Linux
@@ -18,12 +18,12 @@ jobs:
1818
echo "127.0.0.1 elpmaxe.letsencrypt.org" | sudo tee -a /etc/hosts
1919
# https://github.com/marketplace/actions/checkout
2020
- name: Check out code
21-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
21+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2222
with:
2323
persist-credentials: false
2424
# https://github.com/marketplace/actions/setup-go-environment
2525
- name: Set up Go
26-
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
26+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2727
with:
2828
go-version-file: go.mod
2929
- name: Install packages
@@ -44,11 +44,11 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Check out code
47-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
47+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4848
with:
4949
persist-credentials: false
5050
- name: Set up Go
51-
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
51+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5252
with:
5353
go-version-file: go.mod
5454
- name: go install commands
@@ -67,14 +67,14 @@ jobs:
6767
name: Test lego with EAB
6868
runs-on: ubuntu-latest
6969
steps:
70-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
70+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7171
with:
7272
persist-credentials: false
73-
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
73+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7474
with:
75-
go-version-file: go.mod
75+
go-version: stable
7676
- name: Install lego cli
77-
run: go install github.com/go-acme/lego/v4/cmd/lego@latest
77+
run: go install github.com/go-acme/lego/v5@latest
7878
- name: go install commands
7979
run: go install -v ./cmd/...
8080
- name: launch pebble
@@ -83,21 +83,20 @@ jobs:
8383
pebble -config test/config/pebble-config-external-account-bindings.json &
8484
- run: |
8585
LEGO_CA_CERTIFICATES=./test/certs/pebble.minica.pem \
86-
lego --accept-tos \
86+
lego run \
87+
--accept-tos \
8788
--server=https://localhost:14000/dir \
88-
--email="pebble-test@example.letsencrypt.org" \
8989
--domains=example.letsencrypt.org \
9090
--eab \
91-
--kid kid-3 \
92-
--hmac=HjudV5qnbreN-n9WyFSH-t4HXuEx_XFen45zuxY-G1h6fr74V3cUM_dVlwQZBWmc \
93-
--http --http.port=:5002 \
94-
run
91+
--eab.kid kid-3 \
92+
--eab.hmac=HjudV5qnbreN-n9WyFSH-t4HXuEx_XFen45zuxY-G1h6fr74V3cUM_dVlwQZBWmc \
93+
--http --http.address=:5002
9594
go-linux:
9695
name: Run Go tests on Linux
9796
runs-on: ubuntu-latest
9897
steps:
9998
- name: Check out code
100-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
99+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
101100
with:
102101
persist-credentials: false
103102
# Run project unit tests (with the race detector enabled and atomic coverage profile collection)

.golangci.yaml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ linters:
2121
- gocyclo
2222
- goheader
2323
- gomoddirectives
24-
- gomodguard
2524
- goprintffuncname
2625
- importas
2726
- inamedparam
@@ -51,12 +50,12 @@ linters:
5150
min-complexity: 25
5251
misspell:
5352
locale: US
53+
goconst:
54+
ignore-tests: true
5455
exclusions:
55-
generated: lax
5656
presets:
5757
- comments
5858
- common-false-positives
59-
- legacy
6059
- std-error-handling
6160
rules:
6261
- path: ca/ca.go
@@ -71,10 +70,6 @@ linters:
7170
text: string `Incorrect validation certificate for %s challenge. ` has \d occurrences, make it a constant
7271
- path: (.+)\.go$
7372
text: fmt.Sprintf can be replaced with string
74-
paths:
75-
- third_party$
76-
- builtin$
77-
- examples$
7873
issues:
7974
max-issues-per-linter: 0
8075
max-same-issues: 0
@@ -83,9 +78,3 @@ formatters:
8378
- gofmt
8479
- gofumpt
8580
- goimports
86-
exclusions:
87-
generated: lax
88-
paths:
89-
- third_party$
90-
- builtin$
91-
- examples$

0 commit comments

Comments
 (0)