-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
34 lines (29 loc) · 918 Bytes
/
Makefile.toml
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
[config]
skip_core_tasks = true
min_version = "0.35.0"
[env]
BUILD_VERSION = "${CARGO_MAKE_PROJECT_VERSION}"
[tasks.build]
script = '''
docker build \
-f ./Dockerfile \
--build-arg service_version=${BUILD_VERSION} \
--build-arg build-date=$(date --iso-8601=seconds -u) \
--build-arg vcs_ref=$(git rev-parse --short HEAD) \
-t 0x61c88647/firefly-tg-bot-rs:${BUILD_VERSION} \
-t 0x61c88647/firefly-tg-bot-rs:latest \
-t ghcr.io/ffimnsr/firefly-tg-bot-rs:${BUILD_VERSION} \
-t ghcr.io/ffimnsr/firefly-tg-bot-rs:latest .
'''
[tasks.push]
script = '''
docker image push -a ghcr.io/ffimnsr/firefly-tg-bot-rs
docker image push -a 0x61c88647/firefly-tg-bot-rs
'''
[tasks.clean]
script = '''
docker system prune --volumes -f
docker image prune -a --filter="until=1h" --filter "label=org.label-schema.name=firefly-tg-bot-rs" -f
'''
[tasks.deploy]
dependencies = [ "build", "push", "clean" ]