-
Notifications
You must be signed in to change notification settings - Fork 205
46 lines (39 loc) · 1.11 KB
/
overview-complete.yml
File metadata and controls
46 lines (39 loc) · 1.11 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
34
35
36
37
38
39
40
41
42
43
44
45
46
# Check if all patterns are listed in README.md
name: Overview Complete
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
overviewComplete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check if all patterns are listed in README.md
run: |
README="README.md"
# Ensure README.md exists
if [[ ! -f "$README" ]]; then
echo "Error: $README not found!"
exit 1
fi
missing=0
for file in patterns/*/*.md; do
if grep -qF "$file" "$README"; then
echo "✔ Found: $file"
else
echo "✘ Missing: $file"
echo "✘ Pattern file not listed in README.md: $file" >> $GITHUB_STEP_SUMMARY
missing=$((missing + 1))
fi
done
if [[ $missing -gt 0 ]]; then
echo "Some patterns are missing from $README."
exit 1
else
echo "All patterns are listed in $README."
exit 0
fi