name: Nix
on:
push:
branches:
pull_request:
permissions:
contents: read
jobs:
flake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31
- name: Build package
run: |
for attempt in 1 2 3 4 5; do
if nix build --no-link --print-build-logs --option max-jobs 1; then
exit 0
fi
if [ "$attempt" = 5 ]; then
exit 1
fi
sleep 10
done