mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2026-07-02 16:00:50 +02:00
Add example workflow demonstrating linting only changed files (closes #12).
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: tj-actions/changed-files@v24
|
||||
id: changed-files
|
||||
with:
|
||||
files: '**/*.md'
|
||||
separator: "\n"
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v6
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
with:
|
||||
globs: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
Reference in New Issue
Block a user