Skip to content

Commit

Permalink
Create Markdown Lint actions (#17)
Browse files Browse the repository at this point in the history
* Create lint_md_changes.yml

from https://github.com/DavidAnson/markdownlint-cli2-action

* Update lint_md_changes.yml

* Create lint_md_all.yml (#18)

* Create lint_md_all.yml

* Update lint_md_all.yml
  • Loading branch information
ahouseholder authored Oct 27, 2023
1 parent 19dd7ba commit e1b557e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/lint_md_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Lint Markdown (all)"

on:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v13
with:
globs: |
*.md
!test/*.md
20 changes: 20 additions & 0 deletions .github/workflows/lint_md_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint Markdown (Changes)"
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tj-actions/changed-files@v40
id: changed-files
with:
files: '**/*.md'
separator: ","
- uses: DavidAnson/markdownlint-cli2-action@v13
if: steps.changed-files.outputs.any_changed == 'true'
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","

0 comments on commit e1b557e

Please sign in to comment.