Fix the cachix push logic in CircleCI
Before pushing to cachix, check if the CACHIX_SIGNING_KEY env var is available.
This commit is contained in:
@@ -423,11 +423,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build all derivations from default.nix and push results to Cachix
|
name: Build all derivations from default.nix and push results to Cachix
|
||||||
command: |
|
command: |
|
||||||
# We only push to the binary cache if the trigger for the build was not a pull request
|
# Only push to the cache when CircleCI makes the CACHIX_SIGNING_KEY available (e.g. not for
|
||||||
# or if the pull request was from an internal branch. CircleCI is configured to not make
|
# pull requests).
|
||||||
# the CACHIX_SIGNING_KEY secret, which is required for pushing to the cache, available to
|
if [ -n "${CACHIX_SIGNING_KEY:-""}" ]; then
|
||||||
# any other builds.
|
|
||||||
if [ -z "${CI_PULL_REQUEST:-""}" ] || [ "${CIRCLE_PR_USERNAME:-""}" == "PostgREST" ]; then
|
|
||||||
echo "Building and caching all derivations..."
|
echo "Building and caching all derivations..."
|
||||||
nix-build | cachix push postgrest
|
nix-build | cachix push postgrest
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user