-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (28 loc) · 947 Bytes
/
markdownlint.yml
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
name: Markdown Lint
run-name: Markdown Lint ${{ github.sha }} by @${{ github.actor }}
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**/*.md"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Get changed files
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2
id: changed-files
with:
files: "**/*.md"
separator: ","
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@db43aef879112c3119a410d69f66701e0d530809 # v17.0.0
if: steps.changed-files.outputs.any_changed == 'true'
with:
config: .github/.markdownlint-cli2.yaml
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","