name: Daily Tracker Sync on: schedule: - cron: '0 0 * * *' # 每天凌晨运行 workflow_dispatch: # 允许手动在页面点击“重新运行” jobs: update-list: runs-on: ubuntu-latest container: image: node:18-bullseye options: --user node steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: '18' cache: 'npm' - name: Run sync script run: node sync-trackers.js - name: Commit and Push run: | git config --local user.email "action@gitea.com" git config --local user.name "Gitea Action" git add list/ git diff --quiet || ( git commit -m "Update tracker list: $(date +%Y-%m-%d)" && git push origin main )