-
Notifications
You must be signed in to change notification settings - Fork 129
44 lines (35 loc) · 1.03 KB
/
check-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
35
36
37
38
39
40
41
42
43
44
name: Checks - spelling
on:
pull_request:
workflow_dispatch:
jobs:
spelling_check:
runs-on: ubuntu-latest
steps:
- name: Install python3-pip
run: |
sudo apt update
sudo apt install -y --no-install-recommends python3-pip
- name: Install codespell
run: pip install codespell
- name: Print codespell version
run: codespell --version
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true
- name: Run codespell
run: |
./scripts/spelling.sh
- name: Run git diff to see if anything changed
run: /usr/bin/git diff --name-only --exit-code
- name: Run git diff if we failed
if: failure()
run: /usr/bin/git diff > spelling.patch
- name: Archive diff as a patch if we failed
uses: actions/upload-artifact@v3
if: failure()
with:
name: spelling.patch
path: |
${{ github.workspace }}/spelling.patch