Skip to content

Update Repository Stats #3

Update Repository Stats

Update Repository Stats #3

name: Update Repository Stats
on:
schedule:
# Run every day at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install requests pyyaml
- name: Update statistics
run: |
python scripts/update_stats.py
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "📊 Auto-update repository statistics"
git push