adjust dir structures
Some checks failed
docker-release / build-and-push (push) Failing after 9m59s

This commit is contained in:
2025-11-14 15:02:33 +08:00
parent 960cf59a1d
commit 83bb6623e8
10 changed files with 344 additions and 9 deletions

View File

@@ -8,13 +8,10 @@ ARG COMMIT=dev
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY cmd ./cmd
COPY internal ./internal
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
cd /src \
ls -l \
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -trimpath -ldflags "-s -w -X github.com/rogeecn/any-hub/internal/version.Version=${VERSION} -X github.com/rogeecn/any-hub/internal/version.Commit=${COMMIT}" -o /out/any-hub ./cmd/any-hub
go build -trimpath -ldflags "-s -w -X github.com/any-hub/any-hub/internal/version.Version=${VERSION} -X github.com/any-hub/any-hub/internal/version.Commit=${COMMIT}" -o /out/any-hub .
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=builder /out/any-hub /usr/local/bin/any-hub