Skip to content

Commit 3c9d9c0

Browse files
committed
use toolchain golang version instead of min version
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 5092ac0 commit 3c9d9c0

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/build-docker.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,21 @@ jobs:
1818
with:
1919
swap-size-gb: 12
2020

21+
- name: Detect GoLang version
22+
id: toolchain
23+
run: |
24+
GO_VERSION=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)
25+
echo "version=$GO_VERSION" >> "$GITHUB_OUTPUT"
26+
echo "$GO_VERSION"
27+
2128
- uses: actions/setup-go@v5
2229
with:
23-
go-version-file: 'go.mod'
30+
go-version: ${{ steps.toolchain.outputs.version }}
2431
cache-dependency-path: "go.sum"
2532
check-latest: true
2633

2734
- name: Run Golangci lint
28-
uses: golangci/golangci-lint-action@v7
35+
uses: golangci/golangci-lint-action@v8
2936
with:
3037
version: latest
3138
args: --print-resources-usage
@@ -51,9 +58,16 @@ jobs:
5158
with:
5259
swap-size-gb: 12
5360

61+
- name: Detect GoLang version
62+
id: toolchain
63+
run: |
64+
GO_VERSION=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)
65+
echo "version=$GO_VERSION" >> "$GITHUB_OUTPUT"
66+
echo "$GO_VERSION"
67+
5468
- uses: actions/setup-go@v5
5569
with:
56-
go-version-file: 'go.mod'
70+
go-version: ${{ steps.toolchain.outputs.version }}
5771
cache-dependency-path: "go.sum"
5872
check-latest: true
5973

.github/workflows/release-assets.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ jobs:
1515
with:
1616
swap-size-gb: 12
1717

18+
- name: Detect GoLang version
19+
id: toolchain
20+
run: |
21+
GO_VERSION=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)
22+
echo "version=$GO_VERSION" >> "$GITHUB_OUTPUT"
23+
echo "$GO_VERSION"
24+
1825
- uses: actions/setup-go@v5
1926
with:
20-
go-version-file: 'go.mod'
27+
go-version: ${{ steps.toolchain.outputs.version }}
2128
cache-dependency-path: "go.sum"
2229
check-latest: true
2330

0 commit comments

Comments
 (0)