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