Skip to content

Commit f67332f

Browse files
ctauchenclaude
andcommitted
Fix Vale CI to parse space-separated file list correctly
Add separator: " " to the vale-action step so it correctly parses the space-separated file list instead of falling back to scanning the entire repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 46edf43 commit f67332f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/vale.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ jobs:
1212
- name: Get changed files
1313
id: changed
1414
run: |
15-
FILES=$(git diff --name-only --diff-filter=d ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} -- '*.md' '*.mdx' | tr '\n' ' ')
16-
echo "files=$FILES" >> "$GITHUB_OUTPUT"
15+
FILES=$(git diff --name-only --diff-filter=d ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} -- '*.md' '*.mdx')
1716
if [ -z "$FILES" ]; then
1817
echo "skip=true" >> "$GITHUB_OUTPUT"
18+
echo 'files=all' >> "$GITHUB_OUTPUT"
1919
else
2020
echo "skip=false" >> "$GITHUB_OUTPUT"
21+
JSON=$(echo "$FILES" | jq -R -s -c 'split("\n") | map(select(. != ""))')
22+
echo "files=$JSON" >> "$GITHUB_OUTPUT"
2123
fi
2224
- name: Enable Corepack
2325
if: steps.changed.outputs.skip == 'false'
@@ -38,7 +40,7 @@ jobs:
3840
if: steps.changed.outputs.skip == 'false'
3941
run: |
4042
sudo apt-get install ripgrep
41-
FILES="${{ steps.changed.outputs.files }}"
43+
FILES=$(echo '${{ steps.changed.outputs.files }}' | jq -r '.[]' | tr '\n' ' ')
4244
if [ -n "$FILES" ]; then
4345
rg -l0 '\$\[[^\]]*\]' -- $FILES | xargs -0 perl -i -pe 's/\$\[[^\]]*\]/PICKLEVAR/g' || true
4446
fi

0 commit comments

Comments
 (0)