name: YAML Validation on: pull_request: paths: - 'detections/**/*.yml' - 'detections/**/*.yaml' push: branches: - develop paths: - 'detections/**/*.yml' - 'detections/**/*.yaml' jobs: validate: name: Validate Detection YAML Files runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.11' architecture: 'x64' - name: Install yamllint run: pip install yamllint - name: Set up Go uses: actions/setup-go@v6 - name: Install yamlfmt run: | go install github.com/google/yamlfmt/cmd/yamlfmt@latest echo "$HOME/go/bin" >> $GITHUB_PATH - name: Validate all detection YAML files run: | python scripts/validate_yaml.py detections/