Update Star History SVG #36
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 SVG | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" # daily at 03:00 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-star-history: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Generate star history SVGs | |
| env: | |
| STAR_HISTORY_TOKEN: ${{ secrets.STAR_HISTORY_TOKEN || secrets.GITHUB_TOKEN }} | |
| run: bun run .github/scripts/star-history-svg.mjs | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add assets/star-history-light.svg assets/star-history-dark.svg | |
| git diff --staged --quiet || git commit -m "chore: update star history svg" | |
| git push |