Skip to content

Commit

Permalink
fix: add variables for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
vLia committed Jun 1, 2023
1 parent 2a44acf commit ca7897b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .builds-linux.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
env:
# Goreleaser always uses the docker buildx builder with name "default"; see
# https://github.com/goreleaser/goreleaser/pull/3199
# To use a builder other than "default", set this variable.
# Necessary for, e.g., GitHub actions cache integration.
- DOCKER_BUILDX_BUILDER={{ if index .Env "DOCKER_BUILDX_BUILDER" }}{{ .Env.DOCKER_BUILDX_BUILDER }}{{ else }}default{{ end }}
# Setup to enable Docker to use, e.g., the GitHub actions cache; see
# https://docs.docker.com/build/building/cache/backends/
# https://github.com/moby/buildkit#export-cache
- DOCKER_BUILDX_CACHE_FROM={{ if index .Env "DOCKER_BUILDX_CACHE_FROM" }}{{ .Env.DOCKER_BUILDX_CACHE_FROM }}{{ else }}type=registry{{ end }}
- DOCKER_BUILDX_CACHE_TO={{ if index .Env "DOCKER_BUILDX_CACHE_TO" }}{{ .Env.DOCKER_BUILDX_CACHE_TO }}{{ else }}type=inline{{ end }}

before:
hooks:
- go mod tidy
Expand Down

0 comments on commit ca7897b

Please sign in to comment.