name: update-flake-lock
on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * 6,7'


env:
  USER: "runner"

jobs:
  lockfile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6
      - name: Install nix
        uses: DeterminateSystems/nix-installer-action@v22
        with:
          github-token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
          extra_nix_config: |
            experimental-features = nix-command flakes            
      - name: Update flake.lock
        uses: DeterminateSystems/update-flake-lock@v28
        with:
          token: ${{ secrets.GT_TOKEN_FOR_UPDATES }}
          pr-title: "[chore] Update flake.lock"
          pr-labels: |
            dependencies
            automated    