forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (30 loc) · 1009 Bytes
/
spelling.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Check Spelling
on:
pull_request:
branches:
- main
- RPSaaSMaster
- typespec-next
jobs:
check-spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Fetch the entire history of the repository. Attempting to check out
# the merge commit and the base branch does not save any time.
fetch-depth: 0
- name: Run spelling check
run: |
$targetCommittish = git rev-parse origin/${{ github.base_ref }}
./eng/common/scripts/check-spelling-in-changed-files.ps1 `
-CSpellConfigPath 'cspell.json' `
-SourceCommittish '${{ github.sha }}' `
-TargetCommittish $targetCommittish `
-ExitWithError
if ($LASTEXITCODE) {
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check"
exit $LASTEXITCODE
}
shell: pwsh