File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Commit
2+ on :
3+ schedule :
4+ - cron : " 0 * * * *" # Menjalankan setiap jam
5+ push :
6+ branches :
7+ - main
8+ jobs :
9+ auto-commit :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v3
14+
15+ - name : Pull latest changes
16+ run : git pull origin main --rebase || echo "No changes to pull"
17+
18+ - name : Update LAST_UPDATED file
19+ run : |
20+ echo "=== Modifying LAST_UPDATED File ==="
21+ echo "Last updated at: $(date -u)" > LAST_UPDATED
22+ cat LAST_UPDATED
23+
24+ - name : Configure Git
25+ run : |
26+ git config --global user.name "AutoFTbot"
27+ git config --global user.email "[email protected] " 28+
29+ - name : Commit changes
30+ run : |
31+ git add .
32+ arr=("chore(bot): π auto commit"
33+ "chore(bot): π± auto commit"
34+ "chore(bot): πΏ auto commit"
35+ "chore(bot): π© auto commit"
36+ "chore(bot): π auto commit"
37+ "chore(bot): π auto commit"
38+ "chore(bot): π auto commit"
39+ "chore(bot): π€ auto commit"
40+ "chore(bot): π© auto commit"
41+ "chore(bot): π» auto commit")
42+ random_message=${arr[$RANDOM % ${#arr[@]}]}
43+ git commit -m "$random_message" || echo "No changes to commit"
44+
45+ - name : Push changes
46+ run : git push origin main
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+
50+ - name : Debug logs
51+ run : |
52+ git status
53+ git log -n 3
You canβt perform that action at this time.
0 commit comments