name: Vale action

on: [pull_request]

permissions: {}

jobs:
  vale:
    name: runner / vale
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
        continue-on-error: true # GitHub Action flag needed until https://github.com/errata-ai/vale-action/issues/89 is fixed
        with:
          # Errors should be more visible
          fail_on_error: true
          # The other reports don't work, not really https://github.com/reviewdog/reviewdog#reporters
          reporter: github-pr-check
          # Required, set by GitHub actions automatically:
          # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
          token: ${{secrets.GITHUB_TOKEN}}
