Skip to content

Commit 531e780

Browse files
committed
Adds lint.yaml with linting instructions for changed MD files
1 parent f5bab9d commit 531e780

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
fetch-depth: 0
18+
19+
# This identifies which files changed in the specific commit or PR
20+
- uses: tj-actions/changed-files@v47
21+
id: changed-files
22+
with:
23+
files: '**/*.md'
24+
separator: ","
25+
26+
# This runs the linter ONLY on the files identified above
27+
- uses: DavidAnson/markdownlint-cli2-action@v22
28+
if: steps.changed-files.outputs.any_changed == 'true'
29+
with:
30+
globs: ${{ steps.changed-files.outputs.all_changed_files }}
31+
separator: ","

0 commit comments

Comments
 (0)