-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
51 lines (49 loc) · 1.13 KB
/
Taskfile.yml
File metadata and controls
51 lines (49 loc) · 1.13 KB
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
version: '3'
vars:
IMAGE_TAG:
sh: sh next_version
VERSION_TO_DEPLOY:
sh: git tag --sort=-creatordate | head -n 1
tasks:
start-local:
cmds:
- cmd: docker compose up --build --detach
stop-local:
cmds:
- cmd: docker compose down
gen:
cmds:
- cmd: sqlc generate
test:
cmds:
- cmd: set -euo pipefail && go test -json -v ./... 2>&1 | gotestfmt
lint:
cmds:
- cmd: golangci-lint run
- cmd: bun run --cwd frontend lint
fmt:
cmds:
- cmd: golangci-lint fmt
release:
requires:
vars: [ IMAGE_TAG ]
cmds:
- cmd: docker buildx build --target runner -t ghcr.io/torfstack/synod:{{.IMAGE_TAG}} .
- cmd: docker push ghcr.io/torfstack/synod:{{.IMAGE_TAG}}
deploy:
requires:
vars: [ VERSION_TO_DEPLOY ]
cmds:
- cmd: helm upgrade --install synod deployment --set tag={{.VERSION_TO_DEPLOY}}
dev-deploy:
vars:
DEV_IMAGE_TAG: development
cmds:
- task: release
vars:
IMAGE_TAG:
ref: .DEV_IMAGE_TAG
- task: deploy
vars:
VERSION_TO_DEPLOY:
ref: .DEV_IMAGE_TAG