From df4acc8867a08bd2df2dfec74a5f79fe018c2f4d Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 10 Nov 2025 23:45:49 -0800 Subject: [PATCH] ci: add checking Go version from Dockerfile This is to ensure that Go version in Dockerfile (which is used to build release binaries) is: - currently supported; - used in CI tests. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 64ca2f10..3685fa6c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -197,6 +197,18 @@ jobs: make cfmt git diff --exit-code + check-go: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - name: check Go version + run: | + GO_VER=$(awk -F= '/^ARG\s+GO_VERSION=/ {print $2; quit}' Dockerfile) + echo "Go version used in Dockerfile: $GO_VER" + echo -n "Checking if Go $GO_VER is supported ... " + curl -fsSL https://go.dev/dl/?mode=json | jq -e 'any(.[]; .version | startswith("go'$GO_VER'"))' + echo -n "Checking if Go $GO_VER is tested against ... " + yq -e '.jobs.test.strategy.matrix.go-version | contains(["'$GO_VER'.x"])' .github/workflows/test.yml release: timeout-minutes: 30 @@ -253,6 +265,7 @@ jobs: all-done: needs: + - check-go - cfmt - codespell - commit -- 2.43.0