albatros/.albatros

27 lines
636 B
Plaintext
Raw Normal View History

2023-03-16 11:24:23 +00:00
#!/usr/bin/env bash
2023-03-16 11:53:12 +00:00
set -euxo pipefail
2023-05-04 09:00:37 +00:00
2023-05-04 12:59:44 +00:00
nix run .#build-static
nix run .#build-container
2023-05-04 09:00:37 +00:00
2023-05-04 12:59:44 +00:00
if [[ $BRANCH == "main" && -f $SECRET_PATH ]]; then
# Load secrets
2023-05-04 13:16:57 +00:00
set +x
2023-05-04 12:59:44 +00:00
source $SECRET_PATH
2023-05-04 13:16:57 +00:00
set -x
2023-05-04 09:00:37 +00:00
2023-05-04 12:59:44 +00: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 11:53:12 +00:00
# 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
2023-05-04 12:59:44 +00:00
nix run .#publish-static
nix run .#publish-garage
nix run .#publish-docker-hub
fi