Skip to content


Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation


Linter for markdown | with presets

Release Build Build Docker Pulls Issues License

This repository contains source files of docker image (and github action) for markdown files linting. Additionally we provides setting (rules) for the most useful cases, like changelog file linting.

All docker images always can be found on this page.


This image contains markdownlint-cli (node-js) and:

  • Additional rules for changelog file linting (/lint/rules/changelog.js)
  • Configuration file for changelog file linting (it uses additional linting rules, /lint/config/changelog.yml)

Major image tag can be updated in any time, but all changes will be backwards compatible.

markdownlint-cli supports next options (more details can be found on project page):

Usage: markdownlint [options] <files|directories|globs>

  -h, --help                                  output usage information
  -V, --version                               output the version number
  -f, --fix                                   fix basic errors (does not work with STDIN)
  -s, --stdin                                 read from STDIN (does not work with files)
  -o, --output [outputFile]                   write issues to file (no console)
  -c, --config [configFile]                   configuration file (JSON, JSONC, or YAML)
  -i, --ignore [file|directory|glob]          files to ignore/exclude
  -r, --rules  [file|directory|glob|package]  custom rule files

Environment variables

Some linter execution options can be passed through environment variables (multiple variables usage are allowed):

Environment variable Interpretation
INPUT_RULES=/foo.js markdownlint --rules /foo.js ...
INPUT_CONFIG=/bar.yml markdownlint --config /bar.yml ...
INPUT_FIX=true markdownlint --fix ...
INPUT_OUTPUT=/foo markdownlint --output /foo ...
INPUT_IGNORE=/bar markdownlint --ignore /bar ...


For example, you can lint your file using following command:

$ docker run --rm \
    -v "$(pwd)/" \
    avtodev/markdown-lint:v1 \
    --rules /lint/rules/changelog.js \
    --config /lint/config/changelog.yml \


$ docker run --rm \
    -v "$(pwd)/" \
    -e INPUT_RULES=/lint/rules/changelog.js \
    -e INPUT_CONFIG=/lint/config/changelog.yml \
    avtodev/markdown-lint:v1 \

GitHub Actions

    name: Lint changelog file
    runs-on: ubuntu-latest
    - name: Check out code
      uses: actions/checkout@v2

    - name: Lint changelog file
      uses: docker://avtodev/markdown-lint:v1 # fastest way
        rules: '/lint/rules/changelog.js'
        config: '/lint/config/changelog.yml'
        args: './'
        ignore: './ ./' # multiple files must be separated with single space

    # Or using current repository as action:

    - name: Lint changelog file
      uses: avto-dev/markdown-lint@v1
        rules: '/lint/rules/changelog.js'
        config: '/lint/config/changelog.yml'
        args: './'


MIT. Use anywhere for your pleasure.