Update README Stats #71
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: Update README Stats | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs daily at 00:00 UTC | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' # Dependency caching | |
| - name: Install Python Dependencies | |
| run: pip install -r analysis/requirements.txt | |
| # NEW SYSTEM PIPELINE | |
| - name: Run Fetch Repos (Node.js) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node core/fetchRepos.js | |
| - name: Run Analysis Engine (Python) | |
| run: python analysis/engine.py | |
| - name: Run Auto Discovery (Node.js) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node core/autoDiscovery.js | |
| - name: Validate Repository Data | |
| run: node scripts/validate.js | |
| - name: Render New README (Node.js) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node render/renderReadme.js | |
| - name: Commit and Push Changes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md data/ config/ | |
| # Only commit if there are changes | |
| git diff --quiet && git diff --staged --quiet || git commit -m "docs: auto-update repo stats [skip ci]" | |
| git push |