Skip to content

Commit 9a05ab7

Browse files
authored
Merge pull request #5000 from kolyshkin/1.4-check-go
[1.4] check go version from Dockerfile
2 parents 2fed683 + 896c4be commit 9a05ab7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/validate.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ jobs:
188188
steps:
189189
- name: checkout
190190
uses: actions/checkout@v5
191-
with:
192-
fetch-depth: 0
193191
- name: install deps
194192
run: |
195193
sudo apt -qq update
@@ -199,15 +197,25 @@ jobs:
199197
make cfmt
200198
git diff --exit-code
201199
200+
check-go:
201+
runs-on: ubuntu-24.04
202+
steps:
203+
- uses: actions/checkout@v5
204+
- name: check Go version
205+
run: |
206+
GO_VER=$(awk -F= '/^ARG\s+GO_VERSION=/ {print $2; quit}' Dockerfile)
207+
echo "Go version used in Dockerfile: $GO_VER"
208+
echo -n "Checking if Go $GO_VER is supported ... "
209+
curl -fsSL https://go.dev/dl/?mode=json | jq -e 'any(.[]; .version | startswith("go'$GO_VER'"))'
210+
echo -n "Checking if Go $GO_VER is tested against ... "
211+
yq -e '.jobs.test.strategy.matrix.go-version | contains(["'$GO_VER'.x"])' .github/workflows/test.yml
202212
203213
release:
204214
timeout-minutes: 30
205215
runs-on: ubuntu-24.04
206216
steps:
207217
- name: checkout
208218
uses: actions/checkout@v5
209-
with:
210-
fetch-depth: 0
211219

212220
- name: check CHANGELOG.md
213221
run: make verify-changelog
@@ -236,8 +244,6 @@ jobs:
236244
runs-on: ubuntu-24.04
237245
steps:
238246
- uses: actions/checkout@v5
239-
with:
240-
fetch-depth: 0
241247
- name: install bashbrew
242248
env:
243249
BASEURL: https://github.com/docker-library/bashbrew/releases/download
@@ -259,6 +265,7 @@ jobs:
259265
260266
all-done:
261267
needs:
268+
- check-go
262269
- cfmt
263270
- codespell
264271
- commit

0 commit comments

Comments
 (0)