-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 918 Bytes
/
Copy pathmain.yml
File metadata and controls
33 lines (27 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: python script
on:
workflow_dispatch:
# Trigger manually once, and it will loop
permissions:
contents: write
jobs:
update-timestamp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run every 5 minutes in a loop
run: |
git config user.name "brutal-45"
git config user.email "creatorsports81@gmail.com"
# Run for 5 hours (60 iterations x 5 minutes = 300 minutes)
for i in {1..60}; do
TIMESTAMP_FILE="updates.txt"
echo "Last checked: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" > "$TIMESTAMP_FILE"
git add "$TIMESTAMP_FILE"
if ! git diff --cached --quiet; then
git commit -m "python script: $(date -u)"
git push origin HEAD
fi
echo "Waiting 5 minutes..."
sleep 300
done