Skip to content

Commit 9fa8e33

Browse files
authored
Merge pull request #296 from sdcio/fix-ci-gomod
take go version from go.mod instead of ENV variable
2 parents be2f35f + cb4c2b8 commit 9fa8e33

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/cicd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
branches:
99
- "main"
1010
- "!releases/**"
11-
env:
12-
GOVER: 1.23.9
1311

1412
jobs:
1513
unittest:
@@ -19,7 +17,7 @@ jobs:
1917

2018
- uses: actions/setup-go@v5
2119
with:
22-
go-version: ${{ env.GOVER }}
20+
go-version-file: 'go.mod'
2321
- run: go test -cover -coverprofile=coverage.txt ./...
2422
env:
2523
CGO_ENABLED: 0
@@ -38,8 +36,10 @@ jobs:
3836
- name: Checkout
3937
uses: actions/checkout@v4
4038
with:
41-
fetch-depth: 0
42-
39+
fetch-depth: 0
40+
- uses: actions/setup-go@v5
41+
with:
42+
go-version-file: 'go.mod'
4343
- name: Login to private k8s Container Registry
4444
uses: docker/login-action@v3
4545
with:

.github/workflows/dev-nightlies.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
33-
33+
- uses: actions/setup-go@v5
34+
with:
35+
go-version-file: 'go.mod'
3436
# Make sure the @v0.8.0 matches the current version of the action
3537
- uses: webfactory/[email protected]
3638
with:

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ on:
2424
pull_request:
2525
workflow_dispatch:
2626

27-
env:
28-
GOVER: 1.23.9
29-
3027
jobs:
3128
build-and-release:
3229
runs-on: sdcio-action-runners
@@ -48,7 +45,7 @@ jobs:
4845
4946
- uses: actions/setup-go@v5
5047
with:
51-
go-version: ${{ env.GOVER }}
48+
go-version-file: 'go.mod'
5249

5350
- name: Login to GitHub Container Registry
5451
uses: docker/login-action@v3

0 commit comments

Comments
 (0)