on: [push, pull_request]
name: Nix
jobs:
  check-zig-cache-hash:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Setup Nix
        uses: cachix/install-nix-action@v24
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - uses: cachix/cachix-action@v13
        with:
          name: ghostty
          authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
      - name: Check Zig cache hash
        run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
