Skip to content

Commit ebc1caf

Browse files
committed
Filter md
1 parent af6eaef commit ebc1caf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ 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 | grep -E '\.md$' | xargs)" >> $GITHUB_ENV
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 }} | grep -E '\.md$' | xargs)" >> $GITHUB_ENV
28+
changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)
2929
fi
30+
echo "changed_files=$(echo $changed_files | tr ' ' '\n' | grep -E '\.md$' | xargs)" >> $GITHUB_OUTPUT
3031
- name: Lint
3132
uses: avto-dev/markdown-lint@v1
3233
with:

0 commit comments

Comments
 (0)