Skip to content

Get ugit Download Stats #806

Get ugit Download Stats

Get ugit Download Stats #806

name: Get ugit Download Stats
on:
workflow_dispatch:
schedule:
# everyday 9:30 pm
- cron: '0 16 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Download Count
id: downloads
run: |
echo ::set-output name=download_count::$((curl -sq https://formulae.brew.sh/api/formula/ugit.json | jq '.analytics.install_on_request."365d".ugit' | tr "\012" "+" && (curl -sq https://api.github.com/repos/Bhupesh-V/ugit/releases | jq .[].assets[0].download_count | tr "\012" "+" ; echo "0")) | bc)
- name: Create Awesome Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: 6b7b8e8576bc1ca237bffd9a344672ab
filename: ugit-downloads.json
label: downloads
message: ${{ steps.downloads.outputs.download_count }}
color: "#820F82"