Skip to content

Commit 80a8712

Browse files
committed
chore: run CI with Go version from mod file
1 parent dc553db commit 80a8712

File tree

6 files changed

+19
-13
lines changed

6 files changed

+19
-13
lines changed

.github/workflows/codeql.yml

+5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ jobs:
4343
- name: Checkout repository
4444
uses: actions/checkout@v4
4545

46+
- name: Set up Go
47+
uses: actions/setup-go@v5
48+
with:
49+
go-version-file: go.mod
50+
4651
# Initializes the CodeQL tools for scanning.
4752
- name: Initialize CodeQL
4853
uses: github/codeql-action/init@v3

.github/workflows/docs.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2626
restore-keys: |
2727
${{ runner.os }}-go-
28-
- uses: actions/setup-go@v5
28+
- name: Set up Go
29+
uses: actions/setup-go@v5
2930
with:
30-
go-version: ${{ matrix.go }}
31+
go-version-file: go.mod
3132
- run: mkdir -p ~/.config/equinix
3233
- run: touch ~/.config/equinix/metal.yaml
3334
- name: Build docs

.github/workflows/e2e-test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
runs-on: ubuntu-latest
3838
concurrency: 'e2e-test'
3939
steps:
40-
- name: Set up Go
41-
uses: actions/setup-go@v5
42-
with:
43-
go-version: '1.19'
4440
- name: Check out code into the Go module directory
4541
uses: actions/checkout@v4
4642
with:
4743
ref: ${{ github.event.pull_request.head.sha || github.ref }}
44+
- name: Set up Go
45+
uses: actions/setup-go@v5
46+
with:
47+
go-version-file: go.mod
4848
- name: Get dependencies
4949
run: go mod download
5050
- name: Run end-to-end tests

.github/workflows/golangci-lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
name: lint
1717
runs-on: ubuntu-latest
1818
steps:
19+
- uses: actions/checkout@v4
1920
- uses: actions/setup-go@v5
2021
with:
21-
go-version: 1.19
22-
- uses: actions/checkout@v4
22+
go-version-file: go.mod
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v3
2525
with:
@@ -43,4 +43,4 @@ jobs:
4343
# skip-pkg-cache: true
4444

4545
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
46-
# skip-build-cache: true
46+
# skip-build-cache: true

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Set up Go
1919
uses: actions/setup-go@v5
2020
with:
21-
go-version: 1.19
21+
go-version-file: go.mod
2222
-
2323
name: Run GoReleaser
2424
uses: goreleaser/goreleaser-action@v5

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 10
88
steps:
9+
- name: Check out code into the Go module directory
10+
uses: actions/checkout@v4
911
- name: Set up Go
1012
uses: actions/setup-go@v5
1113
with:
12-
go-version: '1.19'
13-
- name: Check out code into the Go module directory
14-
uses: actions/checkout@v4
14+
go-version-file: go.mod
1515
- name: Get dependencies
1616
run: go mod download
1717
- name: Build

0 commit comments

Comments
 (0)