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@616559265b40713947b9c190a8ff4b507b5df49b # 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
