Star-history chart #2
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: Star-history chart | |
| on: | |
| schedule: | |
| - cron: "30 6 * * 1" # Mondays 06:30 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Regenerate star-history SVGs | |
| run: python3 scripts/gen_star_history.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit updated charts | |
| run: | | |
| if git diff --quiet -- assets/star-history-light.svg assets/star-history-dark.svg; then | |
| echo "No change" | |
| 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-light.svg assets/star-history-dark.svg | |
| git commit -m "Update star-history chart" | |
| git push |