Files
Tracker-api/.github/workflows/daily-tracker-sync.yml

29 lines
745 B
YAML

name: Daily Tracker Sync
on:
schedule:
- cron: '0 0 * * *' # 每天凌晨运行
workflow_dispatch: # 允许手动在页面点击“重新运行”
jobs:
update-list:
runs-on: ubuntu-22.04 # 你的 act_runner 标签
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- 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 commit -m "Update tracker list: $(date +%Y-%m-%d)" || exit 0
git push origin main