Skip to content

Update Stars

Update Stars #2

Workflow file for this run

name: Update Stars
on:
schedule:
- cron: '0 0 * * 0' # 每周日午夜更新
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install node-fetch
- name: Update stars
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node .github/scripts/update-stars.js
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git diff --staged --quiet || git commit -m "chore: update stars data"
git push