Skip to content

project-trans/pr-markdownlint-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Markdownlint Action

Reusable GitHub Action that runs markdownlint-cli2 on pull requests.

  • Lint passes & no auto-fix changes → auto-approve the PR
  • Lint fails or auto-fix produces changes → request changes with inline suggestions

Usage

name: markdownlint

on:
  pull_request_target:
    paths: ['**/*.md']

permissions:
  contents: read
  pull-requests: write

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Checkout PR branch
        run: gh pr checkout ${{ github.event.number }}
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - uses: project-trans/markdownlint-action@main
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Required Default Description
glob No **/*.md Glob pattern for markdown files
config No Path to markdownlint config file
GITHUB_TOKEN Yes GitHub token for PR reviews

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors