name: Reply-schemas linter

on:
  push:
    paths:
      - 'src/commands/*.json'
  pull_request:
    paths:
      - 'src/commands/*.json'

concurrency:
  group: reply-schemas-linter-${{ github.head_ref || github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  reply-schemas-linter:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Setup nodejs
        uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
      - name: Install packages
        run: npm install ajv
      - name: linter
        run: node ./utils/reply_schema_linter.js

