Skip to content

Commit 9783174

Browse files
committed
Apply code suggestions
Reference: #22388 (review) Signed-off-by: Eng Zer Jun <[email protected]>
1 parent cf728b4 commit 9783174

File tree

1 file changed

+5
-2
lines changed
  • content/manuals/build/ci/github-actions

1 file changed

+5
-2
lines changed

content/manuals/build/ci/github-actions/cache.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,13 @@ FROM golang:1.21.1-alpine as base-build
198198
199199
WORKDIR /build
200200
201+
COPY go.mod go.sum ./
202+
RUN --mount=type=cache,target=/root/.cache/go-build go mod download
203+
201204
RUN --mount=type=cache,target=/go/pkg/mod \
202205
--mount=type=cache,target=/root/.cache/go-build \
203-
--mount=type=bind,target=. \
204-
go build -o /bin/app /build/src
206+
--mount=type=bind,source=src,target=./src \
207+
go build -o /bin/app ./src
205208
...
206209
```
207210

0 commit comments

Comments
 (0)