Add docker-build caching
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
This commit is contained in:
parent
d13546798b
commit
5d0d1e003a
@ -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"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user