Skip to content

Commit dff2fec

Browse files
ci: add stats updater
1 parent fb52882 commit dff2fec

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/stats.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Update Stats
2+
on:
3+
schedule:
4+
- cron: '0 6 * * *'
5+
jobs:
6+
update:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Update STATS.md
11+
run: |
12+
gh api repos/${GITHUB_REPOSITORY} --jq '{stars:.stargazers_count,forks:.forks_count,issues:.open_issues_count}' > stats.json || true
13+
echo "# Stats" > STATS.md
14+
if [ -f stats.json ]; then cat stats.json >> STATS.md; fi
15+
git add STATS.md || true
16+
git commit -m "ci: update STATS.md [skip ci]" || true
17+
git push || true

0 commit comments

Comments
 (0)