.github/workflows/markdown.yml
name: Markdown
on:
pull_request:
paths:
- '.github/workflows/markdown.yml'
- '.github/markdownlint.json'
- '.github/markdownlint.jsonc'
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Declare default permissions as read only.
permissions: read-all
jobs:
markdown-lint:
name: Lint markdown files
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Register markdownlint warning matcher
run: echo "::add-matcher::.github/markdownlint.json"
- name: Lint markdown files
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
with:
args: '**/*.md'
config: '.github/markdownlint.jsonc'
ignore: 'third_party_licenses.md'
- name: Remove markdownlint warning matcher
if: always()
run: echo "::remove-matcher owner=markdownlint::"
- uses: gaurav-nelson/github-action-markdown-link-check@7d83e59a57f3c201c76eed3d33dff64ec4452d27 # master
if: always()
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
base-branch: ${{ github.base_ref }}
config-file: '.github/markdown-link-check.jsonc'