albatros/.albatros

23 lines
436 B
Text
Raw Normal View History

2023-03-16 12:24:23 +01:00
#!/usr/bin/env bash
2023-03-16 12:53:12 +01:00
set -euxo pipefail
2023-05-04 11:00:37 +02:00
2023-05-04 14:59:44 +02:00
nix run .#build-static
nix run .#build-container
2023-05-04 11:00:37 +02:00
2023-05-04 14:59:44 +02:00
if [[ $BRANCH == "main" && -f $SECRET_PATH ]]; then
# Load secrets
2023-05-04 15:16:57 +02:00
set +x
2023-05-04 14:59:44 +02:00
source $SECRET_PATH
2023-05-04 15:16:57 +02:00
set -x
2023-05-04 11:00:37 +02:00
2023-05-04 14:59:44 +02:00
# Configure Docker Auth
cat > .docker.json <<EOF
{"auths":{"https://index.docker.io/v1/":{"auth":"${DOCKER_AUTH}"}}}
EOF
export DOCKER_CONFIG=`pwd`/.docker.json
2023-03-16 12:53:12 +01:00
2023-05-04 14:59:44 +02:00
nix run .#publish-static
nix run .#publish-garage
nix run .#publish-docker-hub
fi