mirror of
https://github.com/Bhupesh-V/ugit.git
synced 2026-09-10 07:26:20 -04:00
27 lines
944 B
YAML
27 lines
944 B
YAML
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/dynamic-badges-action@v1.1.0
|
|
with:
|
|
auth: ${{ secrets.GIST_TOKEN }}
|
|
gistID: 6b7b8e8576bc1ca237bffd9a344672ab
|
|
filename: ugit-downloads.json
|
|
label: downloads
|
|
message: ${{ steps.downloads.outputs.download_count }}
|
|
color: "#820F82"
|