-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1 KB
/
readme-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
name: Readme verifier
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check README file exist in each subfolders
run: |
folders=$(find . -maxdepth 1 -type d -not -name ".*")
for folder in $folders; do
if [ ! -f "${folder}/README.md" ]; then
echo "🚨 $folder does not contain README.md file"
exit 1
fi
done
- name: Check README files mentions the status
run: |
readme_files=*/README.md
for readme_file in $readme_files; do
if ! grep -q "^\*\*Status: \(✅ Ready to be used in production\|🧪 Experimental\)\*\*" $readme_file; then
echo "🚨 $readme_file does not contain readiness status of the util"
exit 1
fi
done