Repository navigation
python script #9
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: 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 |