Update Sponsors #44
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 Sponsors | |
| on: | |
| schedule: | |
| # Runs at 00:00 UTC every 3 days | |
| - cron: '0 0 */3 * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-sponsors: | |
| name: Update Sponsors List | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Generate Sponsors SVG | |
| run: | | |
| cd .github/scripts | |
| npm install sponsorkit | |
| npx sponsorkit | |
| env: | |
| SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_PAT }} | |
| - name: Commit and Push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if git diff --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git add .github/assets/sponsors.svg | |
| git commit -m "chore: update sponsors list [skip ci]" | |
| git push | |
| fi |