-
Notifications
You must be signed in to change notification settings - Fork 73
50 lines (48 loc) · 1.63 KB
/
check.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
45
46
47
48
49
50
name: Spellcheck changelogs
on:
workflow_dispatch:
push:
branches:
- '**'
paths:
- 'macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/**'
- '.aspell.*.pws'
jobs:
spellchecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup aspell
run: |
sudo apt-get -y update && \
sudo apt-get -y install aspell aspell-en aspell-ru
- name: Run spellchecker for english changelogs
if: always()
run: |
for d in macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/*/ ; do
if [ -f ${d}changes.html ]; then
echo "Checking ${d}changes.html"
SPELLCHECK_OUT=$(cat ${d}changes.html \
| aspell --lang=en --encoding=utf-8 \
--mode=html --personal=./.aspell.en.pws list)
if [ $(echo -n $SPELLCHECK_OUT | wc -c) -ne 0 ]; then
echo $SPELLCHECK_OUT && RC=1
fi
fi
done
exit ${RC:-0}
- name: Run spellchecker for russian changelogs
if: always()
run: |
for d in macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/*/ ; do
if [ -f ${d}changes.ru.html ]; then
echo "Checking ${d}changes.ru.html"
SPELLCHECK_OUT=$(cat ${d}changes.ru.html \
| aspell --lang=ru --encoding=utf-8 \
--mode=html --personal=./.aspell.ru.pws list)
if [ $(echo -n $SPELLCHECK_OUT | wc -c) -ne 0 ]; then
echo $SPELLCHECK_OUT && RC=1
fi
fi
done
exit ${RC:-0}