Backport centralising go version for actions workflows.

Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
James Blair
2023-05-04 15:19:39 +12:00
parent 392144d73a
commit 2ce1c37160
4 changed files with 31 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ main() {
# Check go version.
log_callout "Checking go version"
local go_version current_go_version
go_version="go$(grep go-version .github/workflows/tests.yaml | awk '{print $2}' | tr -d '"')"
go_version="go$(grep -oP '(?<=GO_VERSION:\s")[^"]*' .github/workflows/go-version.yaml | tr -d ' ')"
current_go_version=$(go version | awk '{ print $3 }')
if [[ "${current_go_version}" != "${go_version}" ]]; then
log_error "Current go version is ${current_go_version}, but etcd ${RELEASE_VERSION} requires ${go_version} (see .github/workflows/tests.yaml)."