Skip to content

Commit 027b81d

Browse files
Merge pull request #1626 from aligent/fix/update-readme-checker
fix: check packages/constructs rather than packages
2 parents 61e29fd + 9cfa0bc commit 027b81d

2 files changed

Lines changed: 27 additions & 21 deletions

File tree

.github/workflows/check-readme.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check README
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'packages/constructs/**'
7+
- 'README.md'
8+
9+
jobs:
10+
check-readme:
11+
name: 📖 Check readme for updates
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v6
16+
17+
- name: Compare package list against readme
18+
run: |
19+
PACKAGES="$(ls -1 packages/constructs | wc -l)"
20+
README_PACKAGES="$(grep -Ff <(ls packages/constructs) README.md | wc -l)"
21+
if [ "$PACKAGES" -eq "$README_PACKAGES" ]; then
22+
echo "README correctly lists all packages."
23+
exit 0
24+
else
25+
echo "Mismatch: Found $PACKAGES packages, but README lists $README_PACKAGES."
26+
exit 1
27+
fi

.github/workflows/pull-request.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,6 @@ name: Pull Request
33
on: [pull_request]
44

55
jobs:
6-
check-readme:
7-
name: 📖 Check readme for updates
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout Repository
11-
uses: actions/checkout@v6
12-
with:
13-
fetch-depth: 0
14-
15-
- name: Compare package list against readme
16-
run: |
17-
PACKAGES="$(ls -1 packages | wc -l)"
18-
README_PACKAGES="$(grep -Ff <(ls packages) README.md | wc -l)"
19-
if [ "$PACKAGES" -eq "$README_PACKAGES" ]; then
20-
echo "README correctly lists all packages."
21-
exit 0
22-
else
23-
echo "Mismatch: Found $PACKAGES packages, but README lists $README_PACKAGES."
24-
exit 1
25-
fi
26-
276
install:
287
name: 📦 Install dependencies
298
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)