name: Update Star History Chart on: schedule: # Daily at 06:00 UTC (03:00 BRT) - cron: '0 6 * * *' workflow_dispatch: permissions: contents: write concurrency: group: star-history-update cancel-in-progress: false jobs: update: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v7 with: token: ${{ secrets.STAR_HISTORY_TOKEN }} - name: Set up Python uses: actions/setup-python@v7 with: python-version: '3.12' - name: Install deps run: pip install --no-cache-dir requests matplotlib - name: Generate SVG env: GH_TOKEN: ${{ secrets.STAR_HISTORY_TOKEN }} STAR_HISTORY_REPO: ${{ github.repository }} run: python .github/scripts/generate_star_history.py - name: Commit and push if changed run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add docs/star-history.svg if git diff --staged --quiet; then echo "No changes to commit." else git commit -m "chore(docs): update star history chart" git push fi