Skip to content

test vale gha pr

test vale gha pr #55

Workflow file for this run

name: Vale Lint
on:
pull_request:
paths:
- '**/*.md'
jobs:
vale:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history so we can access all commits
- name: Install Vale
uses: errata-ai/vale-action@v2
- name: Install Reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin
- name: Run Vale and Reviewdog on Changed Files
run: |
for file in ${{ steps.changed-files.outputs.files }}; do
vale --output=JSON $file > vale_output.json
echo "Vale output for $file:"
cat vale_output.json
reviewdog -f=rdjson -name="Vale" -reporter=github-pr-review -level=warning -filter-mode=nofilter < vale_output.json
done
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.SNIPPET_VALIDATION }}
- name: Install Reviewdog Suggestion Action
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.SNIPPET_VALIDATION }}
- name: Run Reviewdog Suggestion
run: |
git diff > diff_output.txt
reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review < diff_output.txt