-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from stakater/markdownlinter
Update markdown linter
- Loading branch information
Showing
1 changed file
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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}} |