Add docker-build caching
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s

This commit is contained in:
root 2024-08-16 15:14:36 +03:00
parent b405c30f92
commit af5d12aadc

View File

@ -7,6 +7,7 @@ RUN go mod download
COPY . . COPY . .
RUN go env -w CGO_ENABLED=1 RUN go env -w CGO_ENABLED=1
RUN go build -o app ./cmd/app ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" go build -o app ./cmd/app
WORKDIR /storage WORKDIR /storage
CMD ["/build/app"] CMD ["/build/app"]