File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ schedules :
2+ - cron : " 0 17 * * 1-5"
3+ displayName : " Scheduled run at 10 AM PT on weekdays"
4+ branches :
5+ include :
6+ - main
7+ always : false # This ensures the pipeline only runs if there have been changes since the last successful run.
8+
9+ - cron : " 0 22 * * 1-5"
10+ displayName : " Afternoon run at 3:00 PM PT M-F"
11+ branches :
12+ include :
13+ - main
14+ always : false
15+
16+ trigger :
17+ - main
18+
19+ jobs :
20+ - job : MergeMainToLive
21+ pool :
22+ vmImage : ' ubuntu-latest'
23+ steps :
24+ - checkout : self
25+ persistCredentials : true
26+ - script : |
27+ git config --global user.name "Ted Hudek"
28+ git config --global user.email "tedhudek@users.noreply.github.com"
29+ git checkout main
30+ git checkout live
31+ git merge main --no-ff --no-commit
32+ if [ $? -eq 0 ]; then
33+ git commit -m "Merged main into live"
34+ git push origin live
35+ else
36+ echo "Error merging main to live"
37+ exit 1
38+ fi
39+ displayName: 'Merge main to live if main has changed'
You can’t perform that action at this time.
0 commit comments