forked from segmentio/chamber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
28 lines (23 loc) · 1005 Bytes
/
justfile
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
image := "genevachat/chamber"
# build latest tag and push to dockerhub with latest tag
build-latest-tag builder="default":
#!/usr/bin/env bash
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "Building $latest_tag"
docker buildx build --builder {{builder}} --push --platform linux/arm64,linux/amd64 -t {{image}}:$latest_tag --build-arg VERSION=$latest_tag .
# build latest commit and push to dockerhub with latest tag
build-latest builder="default":
docker buildx build --builder {{builder}} --push --platform linux/amd64 -t {{image}}:latest .
# build latest commit and push to dockerhub with commit sha tag
build-commit builder="default":
#!/usr/bin/env bash
set -eux
if !(git diff-index --quiet HEAD);
then
echo git repo dirty
exit 1
fi
commit_hash=$(git rev-parse --short HEAD)
image_tag={{image}}:$commit_hash
docker buildx build --builder {{builder}} --push --platform linux/arm64,linux/amd64 -t $image_tag .
echo built: $image_tag