Skip to content
Latchkey

Validate markdown workflow (microsoft/agent-academy)

The Validate markdown workflow from microsoft/agent-academy, explained and optimized by Latchkey.

F

CI health: F - at risk

Point runs-on at Latchkey and get caching, run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: microsoft/agent-academy.github/workflows/validate-markdown.ymlLicense MITView source

What it does

This is the Validate markdown workflow from the microsoft/agent-academy repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Validate markdown
permissions:
  contents: read

on:
  pull_request:
    branches-ignore:
      - gh-pages

jobs:
  markdown-lint:
    name: Lint markdown files
    runs-on: ubuntu-latest
    # Checks markdown syntax and formatting
    steps:
    - uses: actions/checkout@v4

    - name: Run markdownlint
      uses: DavidAnson/markdownlint-cli2-action@v20
      continue-on-error: false
      id: markdown-lint
      with:
        globs: |
          **/*.md
          !.github/**/*.md
        config: '.markdownlint.jsonc'
    
    - name: Report markdown lint results
      if: steps.markdown-lint.outcome == 'failure'
      run: |
        echo "::warning::Markdown formatting issues found. Please review the linting results above and consider fixing formatting inconsistencies for better readability."

  markdown-link-check:
    name: Check markdown links
    runs-on: ubuntu-latest
    # check out the latest version of the code
    steps:
    - uses: actions/checkout@v4

    # Checks the status of hyperlinks in .md files in verbose mode
    - name: Check links
      uses: tcort/github-action-markdown-link-check@v1
      continue-on-error: true
      id: link-check
      with:
        use-quiet-mode: 'yes'          # Only show broken links
        use-verbose-mode: 'yes'
        check-modified-files-only: 'no' # Check all files
        
    - name: Report link check results
      if: steps.link-check.outcome == 'failure'
      run: |
        echo "::warning::Some markdown links are broken. Please review the link check results above."

  spell-check:
    name: Spell check
    runs-on: ubuntu-latest
    # Checks spelling in markdown files
    steps:
    - uses: actions/checkout@v4

    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '18'

    - name: Install cSpell
      run: npm install -g cspell

    - name: Run cSpell
      continue-on-error: false
      id: spell-check
      run: cspell "**/*.md" --no-progress --no-summary

    - name: Report spell check results
      if: steps.spell-check.outcome == 'failure'
      run: |
        echo "::warning::Spelling issues found. Please review the spell check results above and consider fixing typos or adding legitimate words to cspell.json."

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Validate markdown
permissions:
  contents: read
 
on:
  pull_request:
    branches-ignore:
      - gh-pages
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  markdown-lint:
    timeout-minutes: 30
    name: Lint markdown files
    runs-on: latchkey-small
    # Checks markdown syntax and formatting
    steps:
    - uses: actions/checkout@v4
 
    - name: Run markdownlint
      uses: DavidAnson/markdownlint-cli2-action@v20
      continue-on-error: false
      id: markdown-lint
      with:
        globs: |
          **/*.md
          !.github/**/*.md
        config: '.markdownlint.jsonc'
    
    - name: Report markdown lint results
      if: steps.markdown-lint.outcome == 'failure'
      run: |
        echo "::warning::Markdown formatting issues found. Please review the linting results above and consider fixing formatting inconsistencies for better readability."
 
  markdown-link-check:
    timeout-minutes: 30
    name: Check markdown links
    runs-on: latchkey-small
    # check out the latest version of the code
    steps:
    - uses: actions/checkout@v4
 
    # Checks the status of hyperlinks in .md files in verbose mode
    - name: Check links
      uses: tcort/github-action-markdown-link-check@v1
      continue-on-error: true
      id: link-check
      with:
        use-quiet-mode: 'yes'          # Only show broken links
        use-verbose-mode: 'yes'
        check-modified-files-only: 'no' # Check all files
        
    - name: Report link check results
      if: steps.link-check.outcome == 'failure'
      run: |
        echo "::warning::Some markdown links are broken. Please review the link check results above."
 
  spell-check:
    timeout-minutes: 30
    name: Spell check
    runs-on: latchkey-small
    # Checks spelling in markdown files
    steps:
    - uses: actions/checkout@v4
 
    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        cache: 'npm'
        node-version: '18'
 
    - name: Install cSpell
      run: npm install -g cspell
 
    - name: Run cSpell
      continue-on-error: false
      id: spell-check
      run: cspell "**/*.md" --no-progress --no-summary
 
    - name: Report spell check results
      if: steps.spell-check.outcome == 'failure'
      run: |
        echo "::warning::Spelling issues found. Please review the spell check results above and consider fixing typos or adding legitimate words to cspell.json."
 

What changed

2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 3 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow