-
-
Notifications
You must be signed in to change notification settings - Fork 133
33 lines (30 loc) · 1.03 KB
/
Copy pathmarkdown_linter_checks.yml
File metadata and controls
33 lines (30 loc) · 1.03 KB
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
name: Lint markdown
on:
pull_request:
paths:
- "**.md"
- ".github/workflows/markdown_linter_rules.yml"
- ".github/workflows/markdown_linter_checks.yml"
permissions:
contents: read
jobs:
markdown-lint:
name: Lint repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Install markdownlint
run: gem install mdl
- name: Run markdown-linter
run: mdl -s .github/workflows/markdown_linter_rules.rb docs/.
- name: Check image alt texts
run: |
if grep -rEn '!\[\]|!\[[0-9]+\]|!\[[^]]*\.(png|jpe?g|gif|webp)\]' docs --include='*.md'; then
echo "::error::Найдены картинки с пустым или бесполезным alt-текстом — опишите, что на скриншоте (см. CONTRIBUTING.md, раздел «Скриншоты»)"
exit 1
fi