name: 📄 Check formatting

on:
  push:
    branches-ignore:
      - release
    tags-ignore:
      - "*"
  pull_request:
  workflow_dispatch:

jobs:
  format-check:
    name: 📄 Check code formatting with "just fmt"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: cachix/install-nix-action@v31
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - run: nix-shell -p just --run "just fmt --ci"
