From a4f5225cf633649f0be694c3d037bfddbdd2a04c Mon Sep 17 00:00:00 2001 From: Georgy Savva Date: Tue, 8 Jun 2021 13:23:24 +0300 Subject: [PATCH] Try Go build cache --- .github/workflows/docker-develop.yml | 2 ++ Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml index 5b5868540a..c6016e0a37 100644 --- a/.github/workflows/docker-develop.yml +++ b/.github/workflows/docker-develop.yml @@ -40,6 +40,8 @@ jobs: - name: Publish to Docker Hub uses: docker/build-push-action@v2.5.0 with: + build-args: | + mount='id=go_build_cache_mount,type=bind,source=/tmp/foo' tags: iotaledger/goshimmer:develop push: true cache-from: type=local,src=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index a2ef49bd7c..3557c561a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN go mod verify # 3. Build the binary # 4. Verify that goshimmer binary is statically linked RUN --mount=target=. \ - --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,id=go_build_cache_mount,target=/root/.cache/go-build \ GOOS=linux GOARCH=amd64 go build \ -tags="$BUILD_TAGS" \ -ldflags='-w -s -extldflags "-static"' \