diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b051aca..feb7a3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,3 +34,11 @@ jobs: rules: examples/rules/custom.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: ./ + with: + config_file: .markdownlintrc + files: . + ignore_path: examples/.markdownlintignore + rules: examples/rules/custom.js + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/action.yml b/action.yml index fc43ac4..668b685 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: ignore_files: description: files to ignore/exclude required: false + ignore_path: + description: path to file with ignore pattern(s) + required: false rules: description: custom rule files required: false diff --git a/entrypoint.sh b/entrypoint.sh index a5e5431..6902a4c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,7 @@ MARKDOWNLINT=markdownlint MARKDOWNLINT="${MARKDOWNLINT}${INPUT_CONFIG_FILE:+ -c ${INPUT_CONFIG_FILE}}" MARKDOWNLINT="${MARKDOWNLINT}${INPUT_IGNORE_FILES:+ -i ${INPUT_IGNORE_FILES}}" +MARKDOWNLINT="${MARKDOWNLINT}${INPUT_IGNORE_PATH:+ -p ${INPUT_IGNORE_PATH}}" MARKDOWNLINT="${MARKDOWNLINT}${INPUT_RULES:+ -r ${INPUT_RULES}}" # shellcheck disable=SC2086 diff --git a/examples/.markdownlintignore b/examples/.markdownlintignore new file mode 100644 index 0000000..86f2f93 --- /dev/null +++ b/examples/.markdownlintignore @@ -0,0 +1 @@ +examples/ignore/*