Skip to content

Commit

Permalink
.github: install exact golang version if necessary.
Browse files Browse the repository at this point in the history
When building and publishing documentation, install golang toolchain
from release tarball if necessary.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
  • Loading branch information
klihub authored and askervin committed Mar 15, 2024
1 parent 4d545c9 commit 551aed5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
tags:
- v*

env:
GO_VERSION: "1.22.1"

concurrency:
group: gh-pages

Expand All @@ -19,6 +22,14 @@ jobs:
with:
fetch-depth: 0

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

0 comments on commit 551aed5

Please sign in to comment.