name: update-flake-lock
on:
  workflow_dispatch: # allows manual triggering
  schedule:
    - cron: '5 10 8 * *' # Run once a month

jobs:
  lockfile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
      - name: Install Nix
        uses: cachix/install-nix-action@v31
      - name: Update flake.lock
        uses: DeterminateSystems/update-flake-lock@v27
        with:
          pr-body: |
            Automated changes by the update-flake-lock
            ```
            {{ env.GIT_COMMIT_MESSAGE }}
            ```
            bors merge
