Skip to content

Commit e9156a6

Browse files
committed
run markdownlint on changed_files
1 parent 421ef79 commit e9156a6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/markdown-lint.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
- main
88

99
jobs:
10-
lint-blog-files:
11-
name: Lint blog markdown files
10+
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Check out code
15-
uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: tj-actions/changed-files@v45
17+
id: changed-files
18+
with:
19+
files: '**/*.md'
20+
separator: ","
1621
- uses: DavidAnson/markdownlint-cli2-action@v17
22+
if: steps.changed-files.outputs.any_changed == 'true'
1723
with:
18-
config: '.markdownlint.json'
19-
globs: 'content/blog/*.md'
24+
globs: ${{ steps.changed-files.outputs.all_changed_files }}
25+
separator: ","

0 commit comments

Comments
 (0)