-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.34 KB
/
vale.yml
File metadata and controls
51 lines (44 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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