Skip to content

Commit 14af671

Browse files
committed
Filter md
1 parent 570eed3 commit 14af671

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
# source: https://stackoverflow.com/a/74268200
2424
run: |
2525
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)
2727
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)
2929
fi
30+
# filter out files that are not markdown
31+
echo "changed_files=$(echo $changed_files | tr ' ' '\n' | grep -E '\.md$' | xargs)" >> $GITHUB_OUTPUT
3032
- name: Lint
3133
uses: avto-dev/markdown-lint@v1
3234
with:

0 commit comments

Comments
 (0)