Update GitHub Stars #7
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 GitHub Stars | |
| on: | |
| schedule: | |
| # Run weekly on Monday at midnight UTC | |
| - cron: '0 0 * * 1' | |
| workflow_dispatch: | |
| # Allow manual triggering | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-stars: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Fetch GitHub stars | |
| run: npm run fetch:github-stars | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate TypeScript files | |
| run: npm run generate:manifests | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code manifests/github-stars.json src/lib/generated/github-stars.ts || echo "changes=true" >> $GITHUB_OUTPUT | |
| - name: Create Pull Request | |
| if: steps.git-check.outputs.changes == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update GitHub stars data' | |
| title: 'chore: update GitHub stars data' | |
| body: | | |
| ## Summary | |
| Automated weekly update of GitHub stars data. | |
| ### Changes | |
| - Updated `manifests/github-stars.json` with latest star counts | |
| - Regenerated `src/lib/generated/github-stars.ts` | |
| ### Source | |
| This PR was automatically generated by the `update-github-stars` workflow. | |
| branch: auto-update-github-stars | |
| delete-branch: true | |
| labels: | | |
| automated | |
| dependencies |