From 8cf8ff70d728d774cf2d893e93e73c114159e901 Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 5 Apr 2026 20:21:16 +0300 Subject: [PATCH] fix --- .forgejo/workflows/make-image.yml | 3 ++- Dockerfile | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/make-image.yml b/.forgejo/workflows/make-image.yml index 087e050..842c851 100644 --- a/.forgejo/workflows/make-image.yml +++ b/.forgejo/workflows/make-image.yml @@ -33,7 +33,8 @@ jobs: echo "VERSION=${VERSION}" >> $GITHUB_ENV - name: Make image - GIT_CREDENTIALS: https://${{ secrets.MAINTAINER_USERNAME }}:${{ secrets.MAINTAINER_TOKEN }}@repo.nqws.ru/ + env: + GIT_CREDENTIALS: https://${{ secrets.MAINTAINER_USERNAME }}:${{ secrets.MAINTAINER_TOKEN }}@repo.nqws.ru/ run: | docker buildx build --platform linux/amd64 \ --secret id=git_creds,env=GIT_CREDENTIALS \ diff --git a/Dockerfile b/Dockerfile index c8fe906..0254a2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,17 +6,15 @@ ENV GOPRIVATE=repo.nqws.ru/* ENV GONOSUMDB=repo.nqws.ru/* WORKDIR /app - COPY go.mod go.sum ./ -RUN --mount=type=secret,id=netrc,dst=/root/.netrc,mode=0600 \ - git config --global credential.helper 'store --file=/root/.netrc' && \ +RUN --mount=type=secret,id=git_creds,dst=/root/.git-credentials,mode=0600 \ + git config --global credential.helper store && \ go mod download COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o main "./cmd" - FROM alpine:3.23 RUN apk add --no-cache \