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