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