jail.nix/.build.yml
Alex David c141cf8cc6 Prevent CI from failing if secret is not available
Sourcehut will not populate secrets when running CI for patches, but it
would be better if CI runs and passes, even if CI can't push the
artifacts.
2026-02-06 14:56:11 -08:00

33 lines
1 KiB
YAML

image: nixos/25.05
environment:
NIX_CONFIG: "experimental-features = nix-command flakes"
secrets:
- a0a725d2-f640-4a64-b71c-021d2f3f8378
sources:
- https://git.sr.ht/~alexdavid/jail.nix
tasks:
- setup: |
sudo ln -s /etc/zoneinfo/EST /etc/localtime
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use jailnix
cachix doctor
- build-pkgs: |
cd jail.nix
nix build --print-build-logs --out-link result-tests ./tests#all-for-ci
if [ -e ~/.config/cachix/cachix.dhall ]; then
cachix push jailnix result-tests
fi
nix build --print-build-logs --out-link result-website ./website#default
if [ -e ~/.config/cachix/cachix.dhall ]; then
cachix push jailnix result-website
fi
- run-tests: |
cd jail.nix
if [ -e ~/.config/cachix/cachix.dhall ]; then
cachix watch-exec jailnix -- result-tests/run-tests/bin/run-tests
else
result-tests/run-tests/bin/run-tests
fi
- check-fmt: |
cd jail.nix
result-tests/check-fmt/bin/check-fmt