albatros/.albatros
Quentin Dufour b16e51219a
Some checks reported errors
Albatros default
Fix docker config
2023-05-04 15:40:24 +02:00

27 lines
653 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
set +x
source $SECRET_PATH
set -x
# 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