Download Stats #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |