name: json-yaml-validate
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

permissions:
  contents: read
  pull-requests: write # enable write permissions for pull requests

jobs:
  json-yaml-validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - name: json-yaml-validate
        uses: GrantBirki/json-yaml-validate@v3.3.1
        with:
          # ref: https://github.com/GrantBirki/json-yaml-validate?tab=readme-ov-file#inputs-
          comment: "true" # enable comment mode
          yaml_exclude_regex: "(charts/external-dns/templates.*|mkdocs.yml)"
          allow_multiple_documents: "true"
