Sync eng/common directory with azure-sdk-tools for PR 12478 #31092
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SpellCheck | |
on: | |
pull_request: | |
types: | |
# default | |
- opened | |
- synchronize | |
- reopened | |
# re-run if base branch is changed, since previous merge commit may generate incorrect diff | |
- edited | |
permissions: | |
contents: read | |
jobs: | |
spellcheck: | |
name: SpellCheck | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Run spelling check | |
run: | | |
./eng/common/scripts/check-spelling-in-changed-files.ps1 ` | |
-CSpellConfigPath 'cspell.json' ` | |
-SourceCommittish HEAD ` | |
-TargetCommittish HEAD^ ` | |
-SpellCheckRoot (Resolve-Path specification) ` | |
-ExitWithError | |
if ($LASTEXITCODE) { | |
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check" | |
exit $LASTEXITCODE | |
} | |
shell: pwsh |