aerogramme/.albatros

27 lines
658 B
Text
Raw Normal View History

2023-05-15 16:23:23 +00:00
#!/usr/bin/env bash
set -euxo pipefail
nix build --print-build-logs .#packages.x86_64-unknown-linux-musl.debug
2023-05-18 09:56:10 +00:00
2023-05-18 10:39:14 +00:00
if [[ ! -z $TAG ]]; then
# Build
nix run .#build-static
nix run .#build-container
2023-05-18 09:56:10 +00:00
# Configure Docker Auth
mkdir .docker
cat > .docker/config.json <<EOF
{"auths":{"https://index.docker.io/v1/":{"auth":"${DOCKER_AUTH}"}}}
EOF
export DOCKER_CONFIG=`pwd`/.docker/
# Hack to circumvent "initializing source docker-archive:docker/linux.386.tar.gz: creating temporary file: open /var/tmp/docker-tar1213702538: no such file or directory"
mkdir -p /var/tmp/
# Release
nix run .#publish-static
nix run .#publish-garage
nix run .#publish-docker-hub
fi