name: Flake Lock Updater

on:
  schedule:
    # Pi o'clock
    - cron: "0 0 * * 0"
  workflow_dispatch:

jobs:
  lock-updater:
    name: Flake Lock Updater
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: DeterminateSystems/nix-installer-action@v13
      - uses: DeterminateSystems/magic-nix-cache-action@v7
      - uses: DeterminateSystems/update-flake-lock@v23
        with:
          pr-title: "chore: update flake.lock"
          # Labels to be set on the PR
          pr-labels: |
            dependencies
            automated