Files
profile-stats/.gitea/workflows/language-stats.yml
T

38 lines
1.1 KiB
YAML

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