Skip to content

get-downloads

get-downloads #33

name: get-downloads
on:
schedule:
- cron: "0 23 * * *"
permissions:
contents: write
jobs:
request-downloads:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get downloads
env:
API_KEY: ${{ secrets.API_KEY }}
run: |
pip install requests
python get-downloads.py $API_KEY
- name: Commit changes
env:
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
run: |
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USER_NAME"
git add stats.json
git commit -m "Updated download counter"
git push