Skip to content

Commit f20de59

Browse files
Create sync.yml
The syncing process from Azure DevOps to GitHub:
1 parent f02c78e commit f20de59

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/sync.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Sync Azure DevOps to GitHub
2+
3+
on:
4+
schedule:
5+
- cron: '0 * * * *' # Runs every hour (you can adjust this)
6+
workflow_dispatch: # Allows you to run the action manually
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout GitHub Repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Git
17+
run: |
18+
git config --global user.name 'Your Name'
19+
git config --global user.email '[email protected]'
20+
21+
- name: Add Azure DevOps as Remote
22+
run: git remote add azure https://dev.azure.com/yourorganization/yourproject/_git/yourrepository
23+
24+
- name: Pull Changes from Azure DevOps
25+
run: git pull azure main
26+
27+
- name: Push Changes to GitHub
28+
run: git push origin main

0 commit comments

Comments
 (0)