forked from OpenAtomFoundation/SmartIDE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
36 lines (32 loc) · 935 Bytes
/
azure-pipelines.yml
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
# $(github_pat) is in pipeline varialbes
name: $(date:yyyyMMdd)$(rev:.r)_$(Build.BuildId)_$(SourceBranchName)_$(Build.Reason)
trigger:
branches:
include:
- main
paths:
exclude:
- azure-pipelines.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
stages:
- stage: Sync2GitHub
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
jobs:
- job: Sync
displayName: Sync to Github
pool:
vmImage: ubuntu-20.04
steps:
- checkout: self
- task: CmdLine@2
displayName: Sync
inputs:
script: |
git config user.email "[email protected]"
git config user.name "smartide team"
git pull https://github.com/SmartIDE/SmartIDE.git --no-rebase
git push https://$(github_pat)@github.com/SmartIDE/SmartIDE.git refs/remotes/origin/main:refs/heads/main