Skip to content

Commit af6eaef

Browse files
committed
Filter md
1 parent 14af671 commit af6eaef

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ jobs:
2323
# source: https://stackoverflow.com/a/74268200
2424
run: |
2525
if ${{ github.event_name == 'pull_request' }}; then
26-
changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)
26+
echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | grep -E '\.md$' | xargs)" >> $GITHUB_ENV
2727
else
28-
changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)
28+
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -E '\.md$' | xargs)" >> $GITHUB_ENV
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
3230
- name: Lint
3331
uses: avto-dev/markdown-lint@v1
3432
with:

0 commit comments

Comments
 (0)