From 0926306330ec9d2fb77c4281c7057c5ed33c59ff Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Fri, 7 Jul 2023 13:09:18 +0800 Subject: [PATCH] rename token --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index afb73a0..88a5b0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,17 @@ FROM golang:1.20-alpine as builder RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git # Configure creds for gitea -ARG GITEA_TOKEN +ARG GIT_VDBTO_TOKEN # Get and cache deps WORKDIR /plugeth-statediff/ -COPY go.mod . -COPY go.sum . -RUN if [ -n "$GITEA_TOKEN" ]; then git config --global url."https://$GITEA_TOKEN:@git.vdb.to/".insteadOf "https://git.vdb.to/"; fi && \ +COPY go.mod go.sum . +RUN [ -n "$GIT_VDBTO_TOKEN" ] && \ + git config --global url."https://$GIT_VDBTO_TOKEN@git.vdb.to/".insteadOf "https://git.vdb.to/" && \ go mod download && \ rm -f ~/.gitconfig -ADD . . +COPY . . RUN go build --tags linkgeth --buildmode=plugin --trimpath -o statediff.so ./main FROM alpine:3.18