Skip to content

Commit 53fca68

Browse files
authored
Create biargaksepi.yml
1 parent 5e1c325 commit 53fca68

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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

0 commit comments

Comments
Β (0)