stats.yml 736 B

1234567891011121314151617181920212223242526272829303132
  1. name: stats
  2. on:
  3. schedule:
  4. - cron: "0 12 * * *" # Run daily at 12:00 UTC
  5. workflow_dispatch: # Allow manual trigger
  6. jobs:
  7. stats:
  8. runs-on: ubuntu-latest
  9. permissions:
  10. contents: write
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v4
  14. - name: Setup Bun
  15. uses: oven-sh/setup-bun@v2
  16. with:
  17. bun-version: latest
  18. - name: Run stats script
  19. run: bun scripts/stats.ts
  20. - name: Commit stats
  21. run: |
  22. git config --local user.email "[email protected]"
  23. git config --local user.name "GitHub Action"
  24. git add STATS.md
  25. git diff --staged --quiet || git commit -m "Update download stats $(date -I)"
  26. git push