mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
chore: fix spell check workflow
This commit is contained in:
39
.github/workflows/spellcheck-reusable.yml
vendored
Normal file
39
.github/workflows/spellcheck-reusable.yml
vendored
Normal 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 "**"
|
||||
Reference in New Issue
Block a user