Update GitHub Stars #41
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@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup pnpm | |
| uses: ./.github/actions/setup-pnpm | |
| - name: Fetch GitHub stars | |
| run: pnpm fetch:github-stars | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate TypeScript files | |
| run: pnpm generate:manifests | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code data/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@v8 | |
| 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 `data/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 |