File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ jobs:
23
23
# source: https://stackoverflow.com/a/74268200
24
24
run : |
25
25
if ${{ github.event_name == 'pull_request' }}; then
26
- echo " changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
26
+ changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)
27
27
else
28
- echo " changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
28
+ changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)
29
29
fi
30
+ # filter out files that are not markdown
31
+ echo "changed_files=$(echo $changed_files | tr ' ' '\n' | grep -E '\.md$' | xargs)" >> $GITHUB_OUTPUT
30
32
- name : Lint
31
33
uses : avto-dev/markdown-lint@v1
32
34
with :
You can’t perform that action at this time.
0 commit comments