name: Validate Flake Lock

on:
  workflow_dispatch:
  push:
    paths:
      - "**.lock"

permissions: {}

jobs:
  check-flake:
    name: Check Lock
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - name: Install Lix
        uses: ./.github/actions/install-lix

      - name: Check flake.lock
        run: nix run github:extersia-org/pkgs#locker
