Update and refine the example #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: vale-validation | |
| on: | |
| pull_request: | |
| paths: | |
| - README.md | |
| - readme.md | |
| - Readme.md | |
| jobs: | |
| vale: | |
| name: runner / vale | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: clone repo | |
| uses: actions/checkout@v4 | |
| - name: clone vale-styles repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DevExpress/vale-styles | |
| path: vale-styles | |
| ssh-key: ${{ secrets.VALE_STYLES_ACCESS_KEY }} | |
| - name: copy vale rules to the root repo | |
| run: shopt -s dotglob && cp -r ./vale-styles/vale/* . | |
| - name: detect README file | |
| id: detect | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| found="$(find . -maxdepth 1 -type f -iname 'readme.md' -print | head -n 1 || true)" | |
| if [[ -z "$found" ]]; then | |
| echo "No README.md found in repo root. Nothing to lint." | |
| echo "files=[]" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| found="${found#./}" | |
| echo "Found README: $found" | |
| echo "files=[\"$found\"]" >> "$GITHUB_OUTPUT" | |
| - name: vale linter check | |
| if: steps.detect.outputs.files != '[]' | |
| uses: DevExpress/vale-action@reviewdog | |
| with: | |
| files: ${{ steps.detect.outputs.files }} | |
| fail_on_error: true | |
| filter_mode: nofilter | |
| reporter: github-check |