name: Validate Plugins

on:
  push:
    branches: [main]
    paths:
      - "plugins/**"
  pull_request:
    branches: [main]
    paths:
      - "plugins/**"

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install dependencies
        run: pip install pyyaml

      - name: Validate plugins
        run: python .github/scripts/validate_plugins.py
