-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
auto-publish.yaml
45 lines (42 loc) · 1.3 KB
/
auto-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
schedules:
- cron: "0 18 * * 1-5" # Hour 18 UTC == 10am PST
displayName: "Scheduled run at 10 AM PT M-F"
branches:
include:
- main
always: false # This mean the pipeline runs even if there are no changes since the last successful run.
- cron: "0 1 * * 1-5" # Hour 1 UTC == 4pm PST
displayName: "Afternoon run at 4 PM PT M-F"
branches:
include:
- main
always: false # This mean the pipeline runs even if there are no changes since the last successful run.
- cron: "0 6 * * 1-5" # Hour 29 UTC == 4pm PST
displayName: "Afternoon run at 10 PM PT M-F"
branches:
include:
- main
always: false # This mean the pipeline runs even if there are no changes since the last successful run.
trigger:
- none
jobs:
- job: MergeMainToLive
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
persistCredentials: true
- script: |
git config --global user.name "Mike Jacobs"
git config --global user.email "[email protected]"
git checkout main
git checkout live
git merge main --no-ff --no-commit
if [ $? -eq 0 ]; then
git commit -m "Merged main into live"
git push origin live
else
echo "Error merging main to live"
exit 1
fi
displayName: 'Merge main to live if main has changed'