File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments