chore: fix spell check workflow

This commit is contained in:
Dan Brodjieski
2025-09-15 15:16:25 -04:00
parent 0f47cc9cd6
commit 6d9467cc63

View File

@@ -0,0 +1,39 @@
name: Spell Check Reusable
on:
workflow_call:
inputs:
branch:
required: true
type: string
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
# Checkout the branch that triggered the workflow
- name: Checkout branch
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
# Pull latest cspell files from main to keep them in sync
- name: Pull cspell config and dictionary from main
run: |
git fetch origin main
git checkout origin/main -- .github/cspell/
# Setup Node 20+ for cspell
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
# Install cspell globally
- name: Install cspell
run: npm install -g cspell@latest
# Run spell check
- name: Run cspell
run: npx cspell --no-progress --no-summary --config .github/cspell/cspell.json "**"