This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
60 lines (50 loc) · 1.53 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# https://taskfile.dev
version: '3'
vars:
IMAGE_NAME: zebradil/gimme-iphotos
IMAGE_TAG: dev
# linux/arm/v7 is not working currently, issues with python packages
# PLATFORMS: linux/arm/v7,linux/arm64,linux/amd64
PLATFORMS: linux/arm64,linux/amd64
tasks:
default: ${GOTASK_BIN:-task} --list
dev:fmt:
desc: Formats source code
summary: Applies isort and black to all files under gimme_iphotos directory
cmds:
- poetry run isort --recursive gimme_iphotos
- poetry run black gimme_iphotos
docker:run-dev:
desc: Runs dev docker container
summary: |-
Creates container from development image, mounting test directory (mount).
Usage example:
gimme-iphotos -c /tmp/icloud/dev.cfg
cmds:
- |
docker run -it \
-v ${PWD}/mount:/tmp/icloud \
--entrypoint bash \
{{.IMAGE_NAME}}:{{.IMAGE_TAG}}
docker:build-dev:
desc: Builds an image for the current platform without buildx
cmds:
- |
docker build --tag {{.IMAGE_NAME}}:{{.IMAGE_TAG}} .
docker:build:
desc: Builds multiarch container image
cmds:
- |
docker buildx build \
--platform {{.PLATFORMS}} \
--tag {{.IMAGE_NAME}}:{{.IMAGE_TAG}} \
.
docker:build-push:
desc: Builds multiarch container image and pushes it to docker hub
cmds:
- |
docker buildx build \
--push \
--platform {{.PLATFORMS}} \
--tag {{.IMAGE_NAME}}:{{.IMAGE_TAG}} \
.