@@ -126,17 +126,33 @@ jobs:
126126 - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
127127 with :
128128 python-version : ' 3.12'
129- # Use reporter: local so reviewdog does not fetch the PR diff. Large PRs (for example
130- # bulk deletions) exceed GitHub's 300-file diff limit and break github-pr-check.
131- - name : Vale
129+ # Run Vale directly (no reviewdog). Large PRs exceed GitHub's 300-file diff limit,
130+ # which breaks github-pr-check; reporter: local still invokes reviewdog and fails
131+ # with "diff command is empty" when filter-mode is added.
132+ - name : Install Vale
132133 if : steps.changed-files.outputs.any_changed == 'true'
133- uses : errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
134- with :
135- files : ${{ steps.changed-files.outputs.all_changed_files }}
136- vale_flags : ' --config .github-actions/docs-spelling-check/.vale.ini'
137- reporter : local
138- fail_on_error : true
139- separator : ' ,'
134+ run : |
135+ curl -sfL https://install.vale.sh | sh -s -- -b /usr/local/bin
136+ cd .github-actions/docs-spelling-check && vale sync
137+ - name : Run Vale
138+ if : steps.changed-files.outputs.any_changed == 'true'
139+ env :
140+ ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
141+ run : |
142+ set -euo pipefail
143+ files=()
144+ IFS=',' read -ra raw <<< "$ALL_CHANGED_FILES"
145+ for f in "${raw[@]}"; do
146+ f="${f#"${f%%[![:space:]]*}"}"
147+ f="${f%"${f##*[![:space:]]}"}"
148+ [ -z "$f" ] && continue
149+ [ -f "$f" ] && files+=("$f")
150+ done
151+ if [ ${#files[@]} -eq 0 ]; then
152+ echo "No existing files to check (skipping)."
153+ exit 0
154+ fi
155+ vale --config .github-actions/docs-spelling-check/.vale.ini "${files[@]}"
140156 - name : No spelling-scoped files changed
141157 if : steps.changed-files.outputs.any_changed != 'true'
142158 run : echo 'No matching changed files; Vale check skipped.'
0 commit comments