Skip to content

Commit

Permalink
Fix Markdown Lint (#25)
Browse files Browse the repository at this point in the history
The linter was not checking any files.
  • Loading branch information
jimstir authored Mar 26, 2024
1 parent 7698e60 commit 43f4989
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: markdown-linting

on:

push:
branches:
- '**'
Expand All @@ -13,10 +14,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
uses: actions/checkout@v2

- name: Get changed files
continue-on-error: true
run: |
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
gh pr diff ${{ github.event.number }} --name-only | sed -e 's|$|,|' | xargs -i echo "{}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Markdown Linter
uses: DavidAnson/markdownlint-cli2-action@v15
with:
globs: '/*.md'
globs: ${{ env.CHANGED_FILES }}

0 comments on commit 43f4989

Please sign in to comment.