feat: category-driven readme with incremental fetch and metadata enrichment #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main, master] | |
| paths: | |
| - 'readme.md' | |
| - 'readme.md.tpl' | |
| - 'libraries.yml' | |
| - 'scripts/**' | |
| - '.github/workflows/ci.yml' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python deps | |
| run: pip install pyyaml | |
| # Step 1: format only (skip lint), regenerating readme.md. | |
| - name: Format readme.md from libraries.yml | |
| run: python3 scripts/format-awesome-resp.py --no-lint | |
| # Step 2: verify the regenerated readme.md matches the committed version. | |
| - name: Ensure readme.md is up-to-date with libraries.yml | |
| run: | | |
| if ! git diff --exit-code -- readme.md; then | |
| echo "::error::readme.md is out of sync with libraries.yml. Run scripts/format-awesome-resp.py locally and commit the result." | |
| exit 1 | |
| fi | |
| # Step 3: run awesome-lint against the (now-verified) readme.md. | |
| - name: awesome-lint readme.md | |
| run: npx awesome-lint |