From 6e8adcc9cc50a64ba75cf8eea8b630818e6387db Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Thu, 19 Mar 2026 21:38:29 -0500 Subject: [PATCH] Updated Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75f2ef8..b6b4212 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Cache dependencies first COPY go.mod go.sum ./ RUN --mount=type=cache,target=/go/pkg/mod \ - if [ -n "${GITEA_USER}" ] && [ -n "${GITEA_TOKEN}" ]; then \ - git config --global url."https://${GITEA_USER}:${GITEA_TOKEN}@gitea.maximumdirect.net/".insteadOf "https://gitea.maximumdirect.net/"; \ - fi && \ + git config --global url."https://${GITEA_USER}:${GITEA_TOKEN}@gitea.maximumdirect.net/".insteadOf "https://gitea.maximumdirect.net/" && \ go mod download && go mod verify && \ rm -f /root/.gitconfig @@ -44,11 +42,13 @@ ENV CGO_ENABLED=${CGO_ENABLED} \ # Run tests before building the final binary RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ + git config --global url."https://${GITEA_USER}:${GITEA_TOKEN}@gitea.maximumdirect.net/".insteadOf "https://gitea.maximumdirect.net/" && \ go test ./... # Build the cmd entrypoint RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ + git config --global url."https://${GITEA_USER}:${GITEA_TOKEN}@gitea.maximumdirect.net/".insteadOf "https://gitea.maximumdirect.net/" && \ go build \ -trimpath \ -ldflags="-s -w" \