Skip to content

Download Stats

Download Stats #35

name: Download Stats
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch download stats
run: bash scripts/download-stats.sh
env:
GH_TOKEN: ${{ github.token }}
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add assets/downloads-badge.json assets/download-stats.cache
if git diff --cached --quiet; then
echo "No changes"
else
git commit -m "chore: update download stats [skip ci]"
git push
fi