File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto Update Repo
2+ on :
3+ push :
4+ branches :
5+ - main # Triggers only when you push to the main branch
6+
7+ permissions :
8+ contents : write # Grants permission to make changes back to the repo
9+
10+ jobs :
11+ update-task :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout Code
15+ uses : actions/checkout@v4 # Clones your repo into the runner
16+
17+ - name : Run a Task
18+ run : |
19+ echo "Last updated on: $(date)" > last_push_log.txt
20+
21+ - name : Commit and Push Changes
22+ run : |
23+ git config --global user.name "Kishan Miskin"
24+ git config --global user.email "kishanmiskinn@gmail.com"
25+ git add .
26+ git commit -m "Automated update from GitHub Actions" || echo "No changes to commit"
27+ git push
Original file line number Diff line number Diff line change 1+ Last updated on: Mon Mar 9 16:31:07 UTC 2026
You can’t perform that action at this time.
0 commit comments