name: Update star history on: schedule: - cron: "17 1 * * *" workflow_dispatch: permissions: contents: write jobs: update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Verify star history token env: STAR_HISTORY_TOKEN: ${{ secrets.STAR_HISTORY_TOKEN }} run: | if [ -z "$STAR_HISTORY_TOKEN" ]; then echo "::error::Repository secret STAR_HISTORY_TOKEN is required to read timestamped stargazer data." exit 1 fi - name: Generate star history chart env: GITHUB_TOKEN: ${{ secrets.STAR_HISTORY_TOKEN }} run: python3 scripts/generate_star_history.py - name: Commit updated chart run: | if git diff --quiet -- assets/star-history.svg; then exit 0 fi git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add assets/star-history.svg git commit -m "docs: update star history chart" git push