Skip to content

Commit 0957be5

Browse files
committed
ci: derive hive builder Go version from go.mod
1 parent e3297fa commit 0957be5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/test-hive.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
sim-limit: compat
5656
max-allowed-failures: 23
5757
steps:
58+
- name: Checkout Erigon go.mod
59+
uses: actions/checkout@v6
60+
with:
61+
sparse-checkout: go.mod
62+
path: erigon-src
63+
5864
- name: Checkout Hive
5965
uses: actions/checkout@v6
6066
with:
@@ -96,6 +102,9 @@ jobs:
96102
echo Building Hive with Erigon repo - ${SOURCE_REPO}, branch - $branch_name
97103
sed -i "s|^ARG github=erigontech/erigon$|ARG github=${SOURCE_REPO}|" clients/erigon/Dockerfile
98104
sed -i "s/^ARG tag=main$/ARG tag=${branch_name}/" clients/erigon/Dockerfile
105+
go_version=$(go mod edit -json ../erigon-src/go.mod | jq -r .Go)
106+
echo "Patching builder Go version to ${go_version}"
107+
sed -i "s|golang:[0-9.]*-alpine|golang:${go_version}-alpine|" clients/erigon/Dockerfile
99108
go build . >> buildlogs.log
100109
# Depends on the last line of hive output that prints the number of suites, tests and failed
101110
# Currently, we fail even if suites and tests are too few, indicating the tests did not run

0 commit comments

Comments
 (0)