Remove the download stats workflow

This commit is contained in:
mortyzip committed 2026-10-10 02:43:49 +00:00
1 parent 344437f5e8
commit 5c32b71f7c
1 file changed
-45
-45
View File
@@ -1,45 +0,0 @@
name: Download stats
# Appends the release download counts and star count to downloads.csv on the
# stats branch once a day, so there's a history to look at.
on:
schedule:
- cron: '17 6 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
log:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log counts
env:
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if git ls-remote --exit-code --heads origin stats >/dev/null; then
git fetch origin stats
git checkout -B stats origin/stats
else
git checkout --orphan stats
git rm -rf . -q
echo "date,release,file,downloads,stars" > downloads.csv
fi
day=$(date -u +%F)
stars=$(gh api "repos/$GITHUB_REPOSITORY" --jq .stargazers_count)
gh api "repos/$GITHUB_REPOSITORY/releases" --paginate \
--jq ".[] | .tag_name as \$t | .assets[] | \"$day,\(\$t),\(.name),\(.download_count),$stars\"" \
>> downloads.csv
git add downloads.csv
git commit -m "Download stats for $day"
git push origin stats