diff --git a/.github/workflows/vale-linting.yml b/.github/workflows/vale-linting.yml new file mode 100644 index 0000000000..90b9214231 --- /dev/null +++ b/.github/workflows/vale-linting.yml @@ -0,0 +1,22 @@ +name: Vale Documentation Linting + +on: + pull_request: + paths: + - '**.md' + - '**.adoc' + +permissions: + contents: read + +jobs: + vale: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Run Vale Linter + uses: elastic/vale-rules/lint@main \ No newline at end of file diff --git a/.github/workflows/vale-reporting.yml b/.github/workflows/vale-reporting.yml new file mode 100644 index 0000000000..3fe8eed8d4 --- /dev/null +++ b/.github/workflows/vale-reporting.yml @@ -0,0 +1,23 @@ +name: Vale Report + +on: + workflow_run: + workflows: ["Vale Documentation Linting"] + types: + - completed + +permissions: + pull-requests: read + +jobs: + report: + runs-on: ubuntu-latest + if: github.event.workflow_run.event == 'pull_request' + permissions: + pull-requests: write + + steps: + - name: Post Vale Results + uses: elastic/vale-rules/report@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }}