-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
52 lines (43 loc) · 1.06 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
version: '3'
# WARNING: Order matters here
vars:
BIN:
sh: basename "${PWD}"
IMAGE: ghcr.io/pbar1/{{.BIN}}
VERSION:
sh: git describe --tags --always --dirty 2>/dev/null || echo "unknown"
tasks:
default: task --list
clean:
desc: Remove generated files from the working tree
cmds:
- cargo clean
version:
desc: Print version string that will be used
cmds:
- echo {{.VERSION}}
image:
desc: Alias for "image:build"
deps:
- image:build
image:name:
desc: Print container image name that will be used
cmds:
- echo {{.IMAGE}}:{{.VERSION}}
# TODO: Implement multiplatform container images with --platform
image:build:
desc: Build container image
cmds:
- nix build .#dockerImage && ./result | docker load
image:push:
desc: Push container image to remote repository
deps:
- image:build
cmds:
- docker push {{.IMAGE}}:latest # FIXME:
k3d:import:
desc: Imports container image into local K3d cluster
deps:
- image:build
cmds:
- k3d image import {{.IMAGE}}:local