Daily Commit #266
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: Daily Commit | |
| on: | |
| workflow_dispatch: # bisa dijalankan manual | |
| schedule: | |
| - cron: "0 0 * * *" # otomatis tiap jam 00:00 UTC (07:00 WIB) | |
| permissions: | |
| contents: write # <--- WAJIB biar bisa push ke repo | |
| jobs: | |
| auto-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "pankyprtm" | |
| git config --global user.email "pankyprtm@gmail.com" | |
| - name: Create/Update file | |
| run: | | |
| echo "Auto update on $(date)" >> daily.txt | |
| - name: Commit & Push | |
| run: | | |
| git add daily.txt | |
| git commit -m "chore: daily auto commit" || echo "Nothing to commit" | |
| git push |