docker-s3-backup/Taskfile.yml

29 lines
784 B
YAML
Raw Permalink Normal View History

2023-09-14 22:15:37 +00:00
version: '3'
2023-09-19 11:48:08 +00:00
vars:
NAME: code.jhot.me/jhot/docker-s3-backup
2023-09-14 22:15:37 +00:00
tasks:
2023-09-19 11:48:08 +00:00
build:
cmds:
- docker buildx build --platform linux/amd64,linux/arm64 -t "{{.NAME}}:{{.TAG}}" .
vars:
TAG: '{{.TAG | default "latest"}}'
2023-09-19 11:48:08 +00:00
push:
cmds:
- docker buildx build --push --platform linux/amd64,linux/arm64 -t "{{.NAME}}:{{.TAG}}" .
vars:
TAG: '{{.TAG | default "latest"}}'
2023-09-19 11:48:08 +00:00
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-buildx:
cmds:
- docker buildx create --name {{.BUILDER_NAME}} --use
vars:
BUILDER_NAME: '{{.BUILDER_NAME | default "mybuilder"}}'