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}}" .
|
2023-11-01 19:27:58 +00:00
|
|
|
vars:
|
|
|
|
TAG: '{{.TAG | default "latest"}}'
|
2023-09-19 11:48:08 +00:00
|
|
|
push:
|
|
|
|
cmds:
|
2023-11-01 19:27:58 +00:00
|
|
|
- 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}}"
|
2023-11-01 19:27:58 +00:00
|
|
|
vars:
|
|
|
|
TAG: '{{.TAG | default "latest"}}'
|
|
|
|
setup-buildx:
|
|
|
|
cmds:
|
|
|
|
- docker buildx create --name {{.BUILDER_NAME}} --use
|
|
|
|
vars:
|
|
|
|
BUILDER_NAME: '{{.BUILDER_NAME | default "mybuilder"}}'
|