Skip to content

Commit

Permalink
Update markdown-lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jimstir authored Mar 15, 2024
1 parent 7d08886 commit 30490db
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ jobs:

- name: Get changed files
id: changed_files
run: echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})"

- name: Filter Markdown files
id: filter_files
run: echo "::set-output name=markdown_files::$(echo '${{ steps.changed_files.outputs.files }}' | grep '\.md$')"

run: |
git diff --name-only -r HEAD^1 HEAD | while read -r file; do
echo "./${file}"
done
- name: Markdown Linter
uses: DavidAnson/markdownlint-cli2-action@v15
with:
globs: ${{ steps.filter_files.outputs.markdown_files }}
globs: ${{ steps.changed_files.outputs.stdout }}

0 comments on commit 30490db

Please sign in to comment.