depot/.gitlab-ci.yml

13 lines
552 B
YAML

nixCache:
image: "nixos/nix:latest"
script:
- "mkdir -p ops/secrets"
- "cp ${OPS_SECRETS_DEFAULT_NIX} ops/secrets/default.nix"
- "test -d cache || mkdir cache"
- "nix-build ./ci-root.nix --option substituters \"file://$PWD/cache?trusted=1 https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
- "nix copy --to 'file://cache' ./result"
- "nix copy --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
cache:
key: one-key-to-rule-them-all
paths:
- cache/