Skip to content

Commit ef0d8ea

Browse files
ci (docker.yml): fix taskfile interpolation
1 parent c96d5f7 commit ef0d8ea

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

{{cookiecutter.project_slug}}/taskfiles/docker.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ version: "3.0"
33
set: ['e', 'u', 'pipefail']
44
shopt: ['globstar']
55

6-
env:
7-
BUILD: "{{.TLD}}/bin/build.sh"
8-
COMPOSE_FILE: "{{.TLD}}/docker-compose.yml"
9-
DOCKERFILE: "{{.TLD}}/Dockerfile"
10-
PLATFORM:
11-
sh: "echo ${PLATFORM:-linux/arm64/v8}"
12-
REGISTRY:
13-
sh: "echo ${REGISTRY:-ghcr.io}"
14-
USER_NAME:
15-
sh: "echo ${USER_NAME:-pythoninthegrass}"
16-
SERVICE: "mvp"
17-
VERSION:
18-
sh: "echo ${VERSION:-latest}"
6+
# env:
7+
8+
vars:
9+
COMPOSE_FILE: '{{.COMPOSE_FILE | default (printf "%s/docker-compose.yml" .ROOT_DIR)}}'
10+
COMPOSE_REMOVE_ORPHANS: '{{.COMPOSE_REMOVE_ORPHANS | default "true"}}'
11+
DOCKERFILE: '{{.DOCKERFILE | default (printf "%s/Dockerfile" .ROOT_DIR)}}'
12+
ARCH: '{{.ARCH | default "linux/amd64"}}'
13+
REGISTRY: '{{.REGISTRY | default "ghcr.io"}}'
14+
USER_NAME: '{{.USER_NAME | default "pythoninthegrass"}}'
15+
SERVICE: '{{.SERVICE | default "mvp"}}'
16+
VERSION: '{{.VERSION | default "latest"}}'
1917

2018
tasks:
2119
net:

0 commit comments

Comments
 (0)