Skip to content

Commit 1c74d96

Browse files
authored
Merge pull request #302 from makhov/docs-release-pipeline-go-version
Get go version from the go.mod on pipelines
2 parents 4ff0a2c + 7548dfe commit 1c74d96

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ on:
2424
- LICENSE
2525
- '**.svg'
2626

27-
env:
28-
GO_VERSION: "1.21.1"
29-
3027
jobs:
3128
build:
3229
name: Build
@@ -41,7 +38,7 @@ jobs:
4138
- name: Set up Go
4239
uses: actions/setup-go@v4
4340
with:
44-
go-version: ${{ env.GO_VERSION }}
41+
go-version-file: go.mod
4542

4643
- name: Build
4744
run: |
@@ -77,13 +74,13 @@ jobs:
7774
runs-on: ubuntu-latest
7875

7976
steps:
77+
- name: Check out code into the Go module directory
78+
uses: actions/checkout@v4
79+
8080
- name: Set up Go
8181
uses: actions/setup-go@v4
8282
with:
83-
go-version: ${{ env.GO_VERSION }}
84-
85-
- name: Check out code into the Go module directory
86-
uses: actions/checkout@v4
83+
go-version-file: go.mod
8784

8885
- name: Run unit tests
8986
run: |
@@ -111,7 +108,7 @@ jobs:
111108
- name: Set up Go
112109
uses: actions/setup-go@v4
113110
with:
114-
go-version: ${{ env.GO_VERSION }}
111+
go-version-file: go.mod
115112

116113
- name: Create image bundle
117114
run: |
@@ -145,7 +142,7 @@ jobs:
145142
- name: Set up Go
146143
uses: actions/setup-go@v4
147144
with:
148-
go-version: ${{ env.GO_VERSION }}
145+
go-version-file: go.mod
149146

150147
- name: Create image bundle
151148
run: |

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
cache: pip
2525
cache-dependency-path: docs/requirements.txt
2626

27-
- name: Set up Go ${{ env.GO_VERSION }}
27+
- name: Set up Go
2828
uses: actions/setup-go@v4
2929
with:
30-
go-version: ${{ env.GO_VERSION }}
30+
go-version-file: go.mod
3131

3232
- name: Install dependencies
3333
run: |

0 commit comments

Comments
 (0)