diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 70e966e5..f9355c24 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -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 @@ -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 @@ -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'