ci: fix go version check (#6646)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6646
This commit is contained in:
Michael Kriese 2025-01-21 14:42:04 +00:00
commit 8770ee3a99

View file

@ -19,7 +19,7 @@ runs:
set -ex
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
version=$(go version | cut -d' ' -f3)
if [ "$toolchain" != "$version" ]; then
echo "go version mismatch: $toolchain <> $version"
if dpkg --compare-versions ${version#go} lt ${toolchain#go}; then
echo "go version too low: $toolchain >= $version"
exit 1
fi