name: "Pull request"
on:
  pull_request:
  push:
    branches:
      - main
  workflow_dispatch:
jobs:
  nix-flake-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: cachix/install-nix-action@v18
        with:
          extra_nix_config: |
            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
      - run: nix flake check