Get starred repositories #187
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: Get starred repositories | |
| on: | |
| schedule: | |
| - cron: "0 0 */7 * *" | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Make envfile | |
| uses: SpicyPizza/[email protected] | |
| with: | |
| envkey_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| envkey_API_KEY: ${{ secrets.API_KEY }} | |
| envkey_API_BASE: ${{ secrets.API_BASE }} | |
| envkey_API_MODEL: ${{ secrets.API_MODEL }} | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Fetch repositories | |
| run: node get_repos.js | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email '[email protected]' | |
| git add README.md | |
| git commit -m "Update README with starred repositories" || echo "No changes to commit" | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |