Skip to content

Use latest Markdown changes to validate #77

Use latest Markdown changes to validate

Use latest Markdown changes to validate #77

Workflow file for this run

name: Markdown
on:
pull_request:
paths:
- '.github/workflows/markdown.yml'
- '.github/markdownlint.json'
- '.github/markdownlint.jsonc'
- '**/*.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linter:
name: Lint Markdown Files
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- name: Checkout vscode-cmsis-debugger
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
- 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'
- name: Remove Markdownlint Warning Matcher
if: always()
run: echo "::remove-matcher owner=markdownlint::"
check-links:
name: Check Markdown Links
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
- name: Install markdown-link-check
run: npm install --save-dev markdown-link-check
- name: Run markdown-link-check on all markdown files
run: |
for file in $(find . -name '*.md' -not -path './node_modules/*'); do
echo "Checking $file"
npx markdown-link-check "$file" --config .github/markdown-link-check.jsonc -v || exit 1
done