Repository navigation
Gỡ quảng cáo hết hạn #12
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
| # Tự gỡ khối quảng cáo hết hạn trong README (đánh dấu bằng <!-- AD:START until=… --> … <!-- AD:END -->). | |
| # Chạy mỗi 15 phút; GitHub có thể trễ lịch vài phút tới cả giờ khi tải cao. | |
| name: Gỡ quảng cáo hết hạn | |
| on: | |
| schedule: | |
| - cron: "*/15 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| expire: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Gỡ khối hết hạn | |
| id: run | |
| run: echo "out=$(python3 .github/scripts/expire_ads.py README.md)" >> "$GITHUB_OUTPUT" | |
| - name: Commit nếu có thay đổi | |
| if: steps.run.outputs.out == 'changed' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git commit -am "README: gỡ quảng cáo đã hết hạn" | |
| git push |