Skip to content

Update Org README Stats #43

Update Org README Stats

Update Org README Stats #43

name: Update Org README Stats
on:
schedule:
# Runs daily at 08:00 UTC (after c4d-repos-stats finishes at ~07:00 UTC)
- cron: '0 8 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-stats:
runs-on: ubuntu-latest
steps:
- name: Checkout .github repo
uses: actions/checkout@v4
with:
token: ${{ secrets.ORG_PAT }}
- name: Checkout c4d-repos-stats data
uses: actions/checkout@v4
with:
repository: EL-BID/c4d-repos-stats
path: c4d-data
sparse-checkout: data/expanded
sparse-checkout-cone-mode: true
token: ${{ secrets.ORG_PAT }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install requests
- name: Generate SVG dashboard
env:
GH_TOKEN: ${{ secrets.ORG_PAT }}
run: python profile/generate_stats_svg.py
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add profile/stats.svg
git diff --staged --quiet && echo "No changes" && exit 0
git commit -m "πŸ“Š Update public repo stats [automated]"
git push