ci: fix go version check (#6646)
Some checks failed
/ build-oci-image (rootful) (push) Has been cancelled
/ build-oci-image (rootless) (push) Has been cancelled
Integration tests for the release process / release-simulation (push) Has been cancelled
/ release (push) Has been cancelled
testing / backend-checks (push) Has been cancelled
testing / frontend-checks (push) Has been cancelled
testing / test-unit (push) Has been cancelled
testing / test-e2e (push) Has been cancelled
testing / test-remote-cacher (redis) (push) Has been cancelled
testing / test-remote-cacher (valkey) (push) Has been cancelled
testing / test-remote-cacher (garnet) (push) Has been cancelled
testing / test-remote-cacher (redict) (push) Has been cancelled
testing / test-mysql (push) Has been cancelled
testing / test-pgsql (push) Has been cancelled
testing / test-sqlite (push) Has been cancelled
testing / security-check (push) Has been cancelled

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6646
This commit is contained in:
Michael Kriese 2025-01-21 14:42:04 +00:00 committed by Matthias Riße
parent 05daede0ef
commit b0a9f56508

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