Sync Azure DevOps to GitHub #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Azure DevOps to GitHub | |
on: | |
schedule: | |
- cron: '0 * * * *' # Runs every hour (you can adjust this) | |
workflow_dispatch: # Allows you to run the action manually | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub Repository | |
uses: actions/checkout@v2 | |
- name: Set up Git | |
run: | | |
git config --global user.name 'Your Name' | |
git config --global user.email 'youremail@example.com' | |
- name: Add Azure DevOps as Remote | |
run: git remote add azure https://dev.azure.com/yourorganization/yourproject/_git/yourrepository | |
- name: Pull Changes from Azure DevOps | |
run: git pull azure main | |
- name: Push Changes to GitHub | |
run: git push origin main |