Update star history chart #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update star history chart | |
| on: | |
| schedule: | |
| - cron: "17 6 * * *" # daily, 06:17 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-chart: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate SVGs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: python3 .github/scripts/star_history.py | |
| - name: Commit if changed | |
| run: | | |
| 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 assets/star-history-dark.svg | |
| if git diff --cached --quiet; then | |
| echo "No changes" | |
| else | |
| git commit -m "chore: update star history chart" | |
| git push | |
| fi |