Skip to content

Commit 7709e58

Browse files
authored
simulators/ethereum/rpc-compat: custom git ref for execution-apis (#1354)
simulators/ethereum/rpc-compat: allow to pass a git ref for execution-apis
1 parent dda2a1a commit 7709e58

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

simulators/ethereum/rpc-compat/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
FROM golang:1-alpine as builder
33
ARG GOPROXY
44
ENV GOPROXY=${GOPROXY}
5+
ARG branch=main
6+
ENV GIT_REF=${branch}
57

68
RUN apk add --update git ca-certificates gcc musl-dev linux-headers
79

810
# Clone the tests repo.
9-
RUN git clone --depth 1 https://github.com/ethereum/execution-apis.git /execution-apis
11+
# Allow the user to specify a branch or commit to checkout
12+
RUN git init /execution-apis && \
13+
cd /execution-apis && \
14+
git remote add origin https://github.com/ethereum/execution-apis.git && \
15+
git fetch --depth 1 origin $GIT_REF && \
16+
git checkout FETCH_HEAD;
1017

1118
# To run local tests, copy the directory into the same as the simulator and
1219
# uncomment the line below

0 commit comments

Comments
 (0)