albatros/.albatros
Quentin Dufour 903e98ba3b
Some checks reported errors
Albatros default
move build logic to nix
2023-05-04 14:59:44 +02:00

20 lines
422 B
Bash
Executable file

#!/usr/bin/env bash
set -euxo pipefail
nix run .#build-static
nix run .#build-container
if [[ $BRANCH == "main" && -f $SECRET_PATH ]]; then
# Load secrets
source $SECRET_PATH
# Configure Docker Auth
cat > .docker.json <<EOF
{"auths":{"https://index.docker.io/v1/":{"auth":"${DOCKER_AUTH}"}}}
EOF
export DOCKER_CONFIG=`pwd`/.docker.json
nix run .#publish-static
nix run .#publish-garage
nix run .#publish-docker-hub
fi