Skip to content

Commit 5b979ef

Browse files
authored
Create main.yml
automatic update when detect files diff
1 parent 1d1d75e commit 5b979ef

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Auto Commit Changes
2+
3+
on:
4+
schedule:
5+
# Runs every 15 minutes
6+
- cron: '*/15 * * * *'
7+
8+
jobs:
9+
commit-and-push:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
# Fetches the full commit history so that changes can be detected
17+
fetch-depth: 0
18+
19+
- name: Commit and Push Changes
20+
run: |
21+
git config --global user.email "ky1015@tamu.edu"
22+
git config --global user.name "KforKelvin"
23+
git add .
24+
git diff --quiet && git diff --staged --quiet || (git commit -m "Automated commit" && git push)

0 commit comments

Comments
 (0)