Expire sponsor block #13
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: Expire sponsor block | |
| on: | |
| schedule: | |
| # 00:05 in Asia/Shanghai. | |
| - cron: "5 16 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| remove-sponsor: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Remove expired sponsor block | |
| run: python3 .github/scripts/expire_sponsor.py | |
| - name: Commit README update | |
| run: | | |
| if git diff --quiet; then | |
| echo "No README changes to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git commit -m "Remove expired sponsor block" | |
| git push |