-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTaskfile.yml
More file actions
46 lines (34 loc) · 1.14 KB
/
Taskfile.yml
File metadata and controls
46 lines (34 loc) · 1.14 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
version: 3
vars:
NAME: apache/openserverless-devcontainer
TAG:
sh: git tag --sort=-creatordate | head -n 1 || "latest"
tasks:
default: task --list-all
show: "echo {{.NAME}}:{{.TAG}}"
update-opsroot:
silent: true
cmds:
- jq . ../olaris/opsroot.json >_opsroot.orig
- jq '.config.images.devcontainer = "{{.NAME}}:{{.TAG}}"' ../olaris/opsroot.json >_opsroot.json
- diff _opsroot.orig _opsroot.json || cp -v _opsroot.json ../olaris/opsroot.json
image-tag:
- git tag -d "$(git tag)" || true
- git tag "0.1.0-incubating.$(date +%y%m%d%H%M)"
- echo {{.NAME}}:$(git tag --sort=-creatordate | head -n 1)
build:
- docker build -t "{{.NAME}}:{{.TAG}}" . --load
- task: show
clean:
- docker rm -f ssh-devcontainer || true
- docker images | awk '/<none>|devcontainer/{print $3}' | xargs docker rmi -f || true
all:
- task: image-tag
# warning: the ':' is missing intentionally to reload the tag
- task build
- task update-opsroot
publish:
- git commit -m "publishing $(date)" -a || true
- task: image-tag
- task update-opsroot
- git push origin main --tags