1- name : Lint with Vale
2- on : [pull_request]
1+ name : Vale Linting
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened] # Trigger on PR open, new commits, or reopening
36
47jobs :
58 vale :
6- name : Vale linter
9+ name : Lint documentation with Vale
710 runs-on : ubuntu-latest
11+
812 steps :
9- - uses : actions/checkout@v3
10- - uses : errata-ai/vale-action@reviewdog
13+ - name : Checkout code
14+ uses : actions/checkout@v4 # Recommended to use the latest version of checkout
15+
16+ # Optional: Install Asciidoctor if you're linting AsciiDoc files
17+ - name : Install Asciidoctor
18+ run : sudo apt-get install -y asciidoctor
19+
20+ - name : Run Vale with Reviewdog
21+ uses : errata-ai/vale-action@reviewdog # Use the 'reviewdog' branch for PR checks and comments
1122 with :
12- filter_mode : added
13- vale_flags : " --no-exit --minAlertLevel=error --glob=*.adoc"
14- reporter : github-pr-review
15- fail_on_error : false
16- env :
17- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
18- REVIEWDOG_GITHUB_API_TOKEN : ${{secrets.GITHUB_TOKEN}}
23+ # Pin the Vale CLI version for consistent results.
24+ # Check https://github.com/errata-ai/vale-action for the latest recommended version.
25+ version : ' 3.11.2'
26+
27+ # Specifies where Vale will look for files to lint.
28+ # You can specify directories, specific files, or use 'all' for the whole repo.
29+ files : ' ["content", "modules"]'
30+ # 'github-pr-check' creates a check that appears on the PR.
31+ # 'github-pr-review' creates review comments directly on the lines.
32+ # For detailed comments, 'github-pr-check' combined with 'reviewdog' is often best.
33+ reporter : ' github-pr-check'
34+
35+ # 'nofilter' reports errors for all files in the specified 'files' list,
36+ # not just the changes introduced in the PR. This is often desired for initial setup.
37+ # Other options: 'added' (default, only new/modified lines), 'diff_context', 'file'.
38+ filter_mode : ' added'
39+
40+ # If true, the action will fail if Vale reports any errors.
41+ # This will block PR merges if branch protection rules are set.
42+ fail_on_error : true
43+
44+ # Optional: Pass additional flags to the Vale CLI.
45+ # For example, to specify a custom config file:
46+ # vale_flags: '--config .vale/my-custom-config.ini'
47+
48+ # The GitHub token is usually automatically provided by GitHub Actions.
49+ # You typically don't need to explicitly set it unless you have very specific needs.
50+ # token: ${{ secrets.GITHUB_TOKEN }}
0 commit comments