-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
executable file
·88 lines (73 loc) · 2.17 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
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
84
85
86
87
88
version: "3"
vars:
IMAGE_VERSION: "v0.0.5"
IMAGE_NAME: "robotf/robotf-halloween-stories"
tasks:
default:
desc: "Display available tasks"
cmds:
- task --list
actionlint:
desc: "Run actionlint"
cmds:
- echo "Running actionlint"
- actionlint -config-file ./.github/actionlint.yml
markdownlint:
desc: "Run markdownlint"
cmds:
- echo "Running markdownlint"
- markdownlint-cli2 "**/*.md"
shellcheck:
desc: "Run shellcheck"
cmds:
- echo "Running shellcheck"
- shellcheck scripts/setup.sh
yamllint:
desc: "Run yamllint"
cmds:
- echo "Running yamllint"
- yamllint -c .linters/yaml-linter.yml .
pylint:
desc: "Run pylint"
cmds:
- echo "Running pylint"
- pylint **/*.py
buildx:
desc: Setup buildx
cmds:
- docker buildx create --name devops --use --bootstrap
docker-build:
desc: Build Docker Container
# deps:
# - task: buildx
cmds:
- DOCKER_BUILDKIT=1 docker buildx build -f ./Dockerfile --platform linux/amd64 --platform linux/arm64 -t {{.IMAGE_NAME}}:{{.IMAGE_VERSION}} .
docker-load:
desc: Build Docker Container
# deps:
# - task: buildx
cmds:
- DOCKER_BUILDKIT=1 docker buildx build -f ./Dockerfile --load -t {{.IMAGE_NAME}}:{{.IMAGE_VERSION}} .
docker-push:
desc: Build and Push Docker Container with version and latest tags
# deps:
# - task: buildx
cmds:
- echo "Building and pushing Docker images with version {{.IMAGE_VERSION}} and latest tags"
- DOCKER_BUILDKIT=1 docker buildx build --push -f ./Dockerfile --platform linux/amd64 --platform linux/arm64 -t {{.IMAGE_NAME}}:{{.IMAGE_VERSION}} -t {{.IMAGE_NAME}}:latest .
docker-run:
desc: Run Docker Container
cmds:
- docker run -p 8505:8505 {{.IMAGE_NAME}}:{{.IMAGE_VERSION}}
docker-run-it:
desc: Run Docker Container
cmds:
- docker run -it -p 8505:8505 {{.IMAGE_NAME}}:{{.IMAGE_VERSION}} /bin/sh
run:
desc: Run the Streamlit app
cmds:
- streamlit run RoboTF_Halloween_Stories.py --server.port 8505
version:
desc: Return the version
cmds:
- echo {{.IMAGE_VERSION}}