Skip to content

Commit

Permalink
Try Go build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
georgysavva committed Jun 8, 2021
1 parent e7bd28b commit a4f5225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
- name: Publish to Docker Hub
uses: docker/[email protected]
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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"' \
Expand Down

0 comments on commit a4f5225

Please sign in to comment.