Skip to content

Commit 816e009

Browse files
committed
build: use go-version-file instead of hardcoded Go version in CI
Read Go version from go.mod so CI always stays in sync with the project's declared Go version, matching the pattern used in raystack/salt.
1 parent 088d69f commit 816e009

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fetch-depth: 0
1212
- uses: actions/setup-go@v6
1313
with:
14-
go-version: "1.26"
14+
go-version-file: "go.mod"
1515
- name: golangci-lint
1616
uses: golangci/golangci-lint-action@v9
1717
with:

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v6
1717
with:
18-
go-version: "1.26"
18+
go-version-file: "go.mod"
1919
- name: Login to DockerHub
2020
uses: docker/login-action@v4
2121
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v6
1818
with:
19-
go-version: "1.26"
19+
go-version-file: "go.mod"
2020
- name: Login to DockerHub
2121
uses: docker/login-action@v4
2222
with:

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v6
2020
- uses: actions/setup-go@v6
2121
with:
22-
go-version: "1.26"
22+
go-version-file: "go.mod"
2323
- name: Install dependencies
2424
run: sudo apt-get install build-essential
2525
- name: Install packages

0 commit comments

Comments
 (0)