name: Cachix build

on:
  push:
  workflow_dispatch:

jobs:
  linux:
    name: Build Linux
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - uses: cachix/install-nix-action@v13
        with:
          install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.5pre20211026_5667822/install
          extra_nix_config: experimental-features = nix-command flakes
      - uses: cachix/cachix-action@v10
        with:
          name: lava
          authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
      - run: nix build -L .#linux-lava
