name: "Check flake outputs"
on:
  pull_request:
  push:
    branches:
      - master
      - develop
  schedule:
    - cron: '5 10 * * 4' # At 10:05 on Thursday.
jobs:
  check-outputs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: DeterminateSystems/nix-installer-action@v14
      - name: Check flake lockfile
        uses: DeterminateSystems/flake-checker-action@v9
      - name: Check flake outputs
        run: |
          nix flake check --impure --accept-flake-config --keep-going
        env:
          NIXPKGS_ALLOW_BROKEN: "1"
          NIXPKGS_ALLOW_UNFREE: "1"
          NIXPKGS_ALLOW_INSECURE: "1"
          NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: "1"
