name: Star trend on: schedule: - cron: '23 3 * * *' workflow_dispatch: push: branches: [main] paths: ['scripts/update_stars.py', '.github/workflows/stars.yml'] permissions: contents: write concurrency: group: star-trend cancel-in-progress: false jobs: update: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: main - uses: actions/setup-python@v5 with: python-version: '3.11' - run: python scripts/update_stars.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Commit real star snapshots run: | git config user.name 'github-actions[bot]' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' git add docs/assets/stars.json docs/assets/star-history.svg if ! git diff --cached --quiet; then git commit -m 'docs: update star trend snapshot' git push origin HEAD:main fi