-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
83 lines (70 loc) · 1.72 KB
/
Taskfile.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3'
dotenv: ['.direnv']
tasks:
db:codegen:
cmds:
- cmd: sqlc generate
silent: true
- cmd: echo "Codegen complete"
silent: true
db:down:
dir: "{{.TASKFILE_DIR}}/docker"
cmds:
- cmd: docker compose -f compose-dev.yaml down
db:migrate:
dir: "{{.TASKFILE_DIR}}/sql/schema"
cmds:
- cmd: goose up
silent: true
db:migrate:create:
dir: "{{.TASKFILE_DIR}}/sql/schema"
cmds:
- cmd: goose create {{.CLI_ARGS}} sql
silent: true
db:migrate:down:
dir: "{{.TASKFILE_DIR}}/sql/schema"
cmds:
- cmd: goose down
silent: true
db:push:
cmds:
- cmd: docker commit -a "Jarrod Seccombe <[email protected]>" $(docker ps -aqf "name=f1db-seed") ghcr.io/jsec/f1db
silent: true
- cmd: echo $CR_PAT | docker login ghcr.io -u jsec --password-stdin
silent: true
- cmd: docker push ghcr.io/jsec/f1db:latest
silent: true
db:up:
dir: "{{.TASKFILE_DIR}}/docker"
cmds:
- cmd: docker compose -f compose-dev.yaml up --wait
silent: true
db:update:
cmds:
- task: db:migrate
- task: db:codegen
dev:
cmds:
- task: db:up
- cmd: air
image:up:
dir: "{{.TASKFILE_DIR}}/docker"
cmds:
- cmd: docker compose -f compose-seed.yaml up --wait
silent: true
- task: db:migrate
silent: true
image:down:
dir: "{{.TASKFILE_DIR}}/docker"
cmds:
- cmd: docker compose -f compose-seed.yaml down
silent: true
image:new:
cmds:
- task: image:up
- cmd: go run ./cmd/imager
silent: true
- task: db:push
- task: image:down
- cmd: rm -r data
silent: true