ci: Use cachix authtoken in CI (#1821)

This commit is contained in:
Remo Rechkemmer
2021-04-17 16:25:28 +02:00
committed by GitHub
parent 698bfe6e7b
commit 915d568257
2 changed files with 14 additions and 4 deletions
+8 -1
View File
@@ -140,9 +140,16 @@ jobs:
command: |
# Only push to the cache when CircleCI makes the CACHIX_SIGNING_KEY
# available (e.g. not for pull requests).
if [ -n "${CACHIX_SIGNING_KEY:-""}" ]; then
if [ -n "${CACHIX_AUTH_TOKEN:-""}" ]; then
echo "Building and caching all derivations..."
cachix authtoken "$CACHIX_AUTH_TOKEN"
# Push new builds as we go
nix-build | cachix push postgrest
# Make sure that everything, including .drv files, is pushed
nix-env -f default.nix -iA devtools
postgrest-push-cachix
else
echo "Building all derivations (caching skipped for outside pull requests)..."
nix-build