File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync Repos
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ sync :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout Code
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Set Git User Info
19+ run : |
20+ git config --global user.email "work.adityasodha@gmail.com"
21+ git config --global user.name "workofaditya"
22+
23+ - name : Unshallow Clone (if needed)
24+ run : |
25+ if [ -f .git/shallow ]; then
26+ git fetch --unshallow
27+ else
28+ echo "Repository is already complete. No need to unshallow."
29+ fi
30+
31+ - name : Pull from GitLab
32+ env :
33+ GITLAB_TOKEN : ${{ secrets.GITLAB }}
34+ run : |
35+ git remote add gitlab https://workofaditya:$GITLAB_TOKEN@gitlab.com/workofaditya/ChatBot.git
36+ git fetch gitlab main
37+ git rebase gitlab/main || git rebase --skip
38+
39+ - name : Push to GitLab
40+ env :
41+ GITLAB_TOKEN : ${{ secrets.GITLAB }}
42+ run : |
43+ git push gitlab main
You can’t perform that action at this time.
0 commit comments