diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index 5f2654a402d..0a835e6345d 100644 --- a/.github/workflows/taiko-client--docker.yml +++ b/.github/workflows/taiko-client--docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GAR" on: push: - branches: [main] + branches: [upgrade_taiko-client_docker] tags: - "taiko-client-v*" paths: diff --git a/packages/taiko-client/Dockerfile b/packages/taiko-client/Dockerfile index 21d253d450b..515fa4d679a 100644 --- a/packages/taiko-client/Dockerfile +++ b/packages/taiko-client/Dockerfile @@ -1,25 +1,26 @@ +ARG BUILDPLATFORM=linux/amd64 FROM --platform=${BUILDPLATFORM} golang:1.21-alpine as builder RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base -WORKDIR /build +WORKDIR /taiko-client -COPY go.mod go.sum ./ +COPY . . -COPY packages/taiko-client/ packages/taiko-client/ - -WORKDIR /build/packages/taiko-client +RUN cd /taiko-client && \ + go mod init github.com/taikoxyz/taiko-mono && \ + go mod tidy ARG TARGETOS ARG TARGETARCH -RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ +RUN cd /taiko-client && GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ make build FROM alpine:latest RUN apk add --no-cache ca-certificates libstdc++ -COPY --from=builder /build/packages/taiko-client/bin/taiko-client /usr/local/bin/ +COPY --from=builder /taiko-client/bin/taiko-client /usr/local/bin/ EXPOSE 6060