Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

count_downloads

count_downloads #6

name: count_downloads
on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
jobs:
count:
runs-on: ubuntu-latest
steps:
-
name: checkout
uses: actions/checkout@v2
-
run: |
curl -s https://api.github.com/repos/manjaro-gnome/download/releases | egrep 'download_count' | cut '-d:' -f 2 | sed 's/,/+/' | xargs echo | xargs -I N echo N 0 | bc >docs/_includes/download_count
-
run: |
git config --global user.name "Github Update Bot"
git config --global user.email "[email protected]"
git add docs/_includes/download_count
git commit -m "docs: update download count to $(cat docs/_includes/download_count)" && git push || echo "## no change in the download count"