Skip to content

Update downloads

Update downloads #361

name: Update downloads
on:
workflow_dispatch:
schedule:
- cron: '0 1,13 * * *'
jobs:
update-downloads:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check out this repo
uses: actions/checkout@v4
- name: Fetch counts data
run: bash scripts/downloads/get-git-downloads.sh
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Count downloads last month
run: python scripts/downloads/count-downloads-last-month.py > scripts/downloads/last_month.txt
- name: Update readme
run: python scripts/downloads/update-downloads-in-readme.py
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Built on: ${timestamp}" || exit 0
git push