Keep Contribution Graph Random 🌱 #2
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: Keep Contribution Graph Random 🌱 | |
| on: | |
| schedule: | |
| - cron: "0 8 * * *" # Runs daily at 8 AM UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| auto-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Generate random commits | |
| run: | | |
| # Random number of commits between 1 and 5 | |
| NUM_COMMITS=$(( (RANDOM % 5) + 1 )) | |
| echo "Making $NUM_COMMITS commits today..." | |
| for i in $(seq 1 $NUM_COMMITS); do | |
| echo "Commit $i on $(date)" >> activity.log | |
| git add . | |
| git commit -m "Automated commit #$i at $(date)" | |
| done | |
| - name: Push changes | |
| run: | | |
| git config --global user.name "Tejas Patil" | |
| git config --global user.email "tejas2382004@gmail.com" | |
| git push |