Update Org Stats #4240
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
| # .github/workflows/update-stats.yml | |
| name: Update Org Stats | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 * * * *" # Berjalan setiap jam | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| # Berikan izin kepada job ini untuk menulis ke isi repositori | |
| # Ini adalah langkah krusial agar bisa melakukan push | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Generate Org Stats | |
| run: python gen_stats.py | |
| env: | |
| TOKEN: ${{ secrets.PAT }} | |
| - name: Commit and Push changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: Update Org Stats" | |
| file_pattern: profile/README.md |