20 lines
494 B
Bash
Executable File
20 lines
494 B
Bash
Executable File
set -ex
|
|
tag=$(git describe --always)
|
|
repo=novit.tech/direktil/dkl:$tag
|
|
|
|
publish() {
|
|
arch=$1
|
|
pf=$2
|
|
|
|
docker build --push --platform=$pf . -t $repo
|
|
|
|
for bin in dkl dls; do
|
|
curl --user $(jq '.auths["novit.tech"].auth' ~/.docker/config.json -r |base64 -d) \
|
|
--upload-file <(docker run --rm --platform $pf $repo cat /bin/$bin) \
|
|
https://novit.tech/api/packages/direktil/generic/dkl/$tag/$bin.$arch
|
|
done
|
|
}
|
|
|
|
publish x86_64 linux/amd64
|
|
publish arm64 linux/arm64
|