Skip to content

Commit

Permalink
Merge pull request #136 from stakater/markdownlinter
Browse files Browse the repository at this point in the history
Update markdown linter
  • Loading branch information
rasheedamir authored Nov 20, 2024
2 parents b86e8e7 + 7f75c83 commit c49ac61
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/pull_request_doc_qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: Documentation Quality Assurance
on:
workflow_call:
inputs:
MD_CONFIG:
description: Markdown link checker config file
DOC_SRC:
description: Documentation source
required: true
type: string
DOC_SRC:
description: Documentation directory
MD_CONFIG:
description: Markdown link-checker configuration file
required: true
type: string
MD_LINT_CONFIG:
description: Markdown lint config file
description: Markdown linting configuration file
required: true
type: string

Expand Down Expand Up @@ -69,8 +69,16 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}
- name: markdownlint-cli
uses: nosborn/[email protected]
- name: Convert the spaces in the doc source input to newlines
id: doc_src_newlines
run: |
doc_src_newlines=$(echo "${{inputs.DOC_SRC}}" | sed -e 's/ /\n/g')
echo 'DOC_SRC_NEWLINES<<EOF' >> $GITHUB_OUTPUT
echo "${doc_src_newlines}" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: markdown linting check
uses: DavidAnson/[email protected]
with:
files: ${{inputs.DOC_SRC}}
config_file: ${{inputs.MD_LINT_CONFIG}}
globs: |
${{ steps.doc_src_newlines.outputs.DOC_SRC_NEWLINES }}
config: ${{inputs.MD_LINT_CONFIG}}

0 comments on commit c49ac61

Please sign in to comment.