-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
49 lines (42 loc) · 907 Bytes
/
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
version: "3"
dotenv: [".env"]
vars:
APP: ot2mqtt
tasks:
clean:
cmds:
- go clean -v
build:
cmds:
- go build
sources:
- ./*.go
generates:
- ./{{.APP}}
deploy:
deps: [build]
vars:
DEST_DIR: /usr/local/bin/
cmds:
- scp -p {{.APP}} {{.DEPLOY_HOST}}:{{.DEPLOY_DIR}}
podman_build:
desc: Build container image
deps:
- build
cmds:
- echo building $TAG:$VERSION
- podman build --file Dockerfile -t $TAG:$VERSION .
status:
# try a pull in case it's built but not local
- podman pull $TAG:$VERSION
# check to see if already built
- podman inspect --type=image $TAG:$VERSION
podman_push:
desc: Push container image
deps:
- podman_build
cmds:
- podman push $TAG:$VERSION
status:
# check to see if already pushed
- podman pull $TAG:$VERSION