version: '3' vars: NAME: code.jhot.me/jhot/docker-s3-backup tasks: build: cmds: - docker buildx build --platform linux/amd64,linux/arm64 -t "{{.NAME}}:{{.TAG}}" . vars: TAG: '{{.TAG | default "latest"}}' push: cmds: - docker push "{{.NAME}}:{{.TAG}}" tag: prompt: This will push a git tag and docker image versioned {{.TAG}}... Do you want to continue? cmds: - git tag "{{.TAG}}" - git push origin "{{.TAG}}" vars: TAG: '{{.TAG | default "latest"}}' setup-docker: preconditions: - sh: '[ "$UID" -eq 0 ]' msg: Task must be run as root cmds: - apt-get update && apt-get install -y curl - curl -fsSL https://get.docker.com -o /tmp/get-docker.sh - sh /tmp/get-docker.sh setup-buildx: cmds: - docker buildx create --name {{.BUILDER_NAME}} --use vars: BUILDER_NAME: '{{.BUILDER_NAME | default "mybuilder"}}'