name: Update Flake Lockfile

on:
  schedule:
    # run weekly on sunday
    - cron: "0 0 * * 0"
  workflow_dispatch:

permissions: {}

jobs:
  update-flake:
    if: github.repository == 'PrismLauncher/PrismLauncher'

    permissions:
      contents: write
      pull-requests: write

    runs-on: ubuntu-slim

    steps:
      - uses: actions/checkout@v6
      - uses: cachix/install-nix-action@96951a368ba55167b55f1c916f7d416bac6505fe # v31

      - uses: DeterminateSystems/update-flake-lock@v28
        with:
          commit-msg: "chore(nix): update lockfile"
          pr-title: "chore(nix): update lockfile"
          pr-labels: |
            platform: Linux
            area: packaging
            complexity: low
            priority: low
            type: robot
            changelog:omit
