Skip to content

Commit 659d042

Browse files
committed
.github: install exact golang version if necessary.
When building and publishing documentation, install golang toolchain from release tarball if necessary. Signed-off-by: Krisztian Litkey <[email protected]>
1 parent 4d545c9 commit 659d042

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
tags:
99
- v*
1010

11+
env:
12+
GO_VERSION: "1.22.1"
13+
1114
concurrency:
1215
group: gh-pages
1316

@@ -19,6 +22,14 @@ jobs:
1922
with:
2023
fetch-depth: 0
2124

25+
- name: Install exact golang version from release tarball if needed
26+
run: |
27+
go_version=$(go version | sed 's/^go version //;s/ .*$//')
28+
if [ "$go_version" != "${{ env.GO_VERSION }} " ]; then
29+
wget https://go.dev/dl/go${{ env.GO_VERSION }}.linux-amd64.tar.gz
30+
sudo tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-amd64.tar.gz
31+
echo "/usr/local/go/bin" >> $GITHUB_PATH
32+
fi
2233
- name: Install build dependencies
2334
run: |
2435
pip3 install --user -r docs/requirements.txt

0 commit comments

Comments
 (0)