Skip to content

count_downloads

count_downloads #27703

name: count_downloads
on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
jobs:
count:
runs-on: ubuntu-latest
steps:
-
name: checkout
uses: actions/checkout@v3.3.0
-
run: |
curl -s https://api.github.com/repos/manjaro-pinephone/phosh/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 "github@manjaro.org"
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"