Skip to content

Commit ccc6b22

Browse files
update vale workflow (25.1.3+)
1 parent 4f1a8ee commit ccc6b22

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/vale.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,31 @@ jobs:
2121
ssh-key: ${{ secrets.VALE_STYLES_ACCESS_KEY }}
2222
- name: copy vale rules to the root repo
2323
run: shopt -s dotglob && cp -r ./vale-styles/vale/* .
24+
25+
- name: detect README file
26+
id: detect
27+
shell: bash
28+
run: |
29+
set -euo pipefail
30+
31+
found="$(find . -maxdepth 1 -type f -iname 'readme.md' -print | head -n 1 || true)"
32+
33+
if [[ -z "$found" ]]; then
34+
echo "No README.md found in repo root. Nothing to lint."
35+
echo "files=[]" >> "$GITHUB_OUTPUT"
36+
exit 0
37+
fi
38+
39+
found="${found#./}"
40+
41+
echo "Found README: $found"
42+
echo "files=[\"$found\"]" >> "$GITHUB_OUTPUT"
43+
2444
- name: vale linter check
45+
if: steps.detect.outputs.files != '[]'
2546
uses: DevExpress/vale-action@reviewdog
2647
with:
27-
files: '["[Rr]eadme.md"]'
48+
files: ${{ steps.detect.outputs.files }}
2849
fail_on_error: true
2950
filter_mode: nofilter
3051
reporter: github-check

0 commit comments

Comments
 (0)