Skip to content

Commit

Permalink
Merge branch 'main' into 51-feature-markdown-linter-wf-run-only-in-ca…
Browse files Browse the repository at this point in the history
…se-of-changes-to-markdown-files
  • Loading branch information
chicco785 authored Oct 10, 2023
2 parents 5e6f811 + 71c6429 commit 93563ad
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ on:
default: '.github/config/.markdownlint.json'
required: false
type: string
md-lint-globs:
required: false
type: string
default: |
**/*.md
**/*.MD
#.github
#vendor
jobs:
changes:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,7 +66,7 @@ jobs:
- name: Prettify MD files
uses: zaphiro-technologies/prettier_action@main
with:
prettier_options: --ignore-path .github/config/.prettierignore --prose-wrap always --write **/*.{md,MD}
prettier_options: --prose-wrap always --write **/*.{md,MD}
dry: true
dry_no_fail: true
- name: Lint
Expand All @@ -67,20 +75,14 @@ jobs:
with:
fix: true
config: ${{ inputs.config-lint-path }}
globs: |
**/*.md
**/*.MD
globs: ${{ inputs.md-lint-globs || '**/*.{md,MD}' }}
- name: Lint
if: ${{ github.event_name != ' workflow_call' }}
uses: DavidAnson/markdownlint-cli2-action@v11
with:
fix: true
config: '.github/config/.markdownlint.json'
globs: |
**/*.md
**/*.MD
#.github
#vendor
globs: ${{ inputs.md-lint-globs || '**/*.{md,MD}' }}
- name: Commit markdown-lint changes
run: |
git config --global user.name 'Bot'
Expand Down

0 comments on commit 93563ad

Please sign in to comment.