feat: add Gitea action to update language usage stats in profile README.md

Co-authored-by: aider (o3) <aider@aider.chat>
This commit is contained in:
Mark Eaton
2025-08-13 11:15:41 -04:00
co-authored by aider
commit b64c743108
2 changed files with 130 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
name: Update Language Stats
on:
schedule:
- cron: "0 6 * * *" # run every day at 06:00 UTC
workflow_dispatch: # allow manual runs
push:
paths:
- "scripts/language_stats.py"
jobs:
lang-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python deps
run: sudo apt-get update && sudo apt-get install -y python3 python3-pip
- name: Run language stats script
env:
GITEA_BASE_URL: ${{ secrets.GITEA_BASE_URL }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }}
run: python3 scripts/language_stats.py
- name: Commit and push changes
run: |
git config --global user.name "lang-stats-bot"
git config --global user.email "bot@example.com"
git add .profile/README.md
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "chore(profile): update language stats"
git push
fi