ci: daily stats script

This commit is contained in:
Dax Raad
2025-06-28 21:55:24 -04:00
parent f0962e2d9c
commit 780419ecae
3 changed files with 260 additions and 1 deletions

30
.github/workflows/stats.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: stats
on:
schedule:
- cron: "0 12 * * *" # Run daily at 12:00 UTC
workflow_dispatch: # Allow manual trigger
jobs:
stats:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Run stats script
run: bun scripts/stats.ts
- name: Commit stats
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add STATS.md
git diff --staged --quiet || git commit -m "Update download stats $(date -I)"
git push