We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf728b4 commit 9783174Copy full SHA for 9783174
content/manuals/build/ci/github-actions/cache.md
@@ -198,10 +198,13 @@ FROM golang:1.21.1-alpine as base-build
198
199
WORKDIR /build
200
201
+COPY go.mod go.sum ./
202
+RUN --mount=type=cache,target=/root/.cache/go-build go mod download
203
+
204
RUN --mount=type=cache,target=/go/pkg/mod \
205
--mount=type=cache,target=/root/.cache/go-build \
- --mount=type=bind,target=. \
- go build -o /bin/app /build/src
206
+ --mount=type=bind,source=src,target=./src \
207
+ go build -o /bin/app ./src
208
...
209
```
210
0 commit comments