Repository navigation
v1.0.0 – Initial Release: GitHub to Azure DevOps Sync
Features
- Automatically creates an Azure DevOps project if it does not exist.
- Automatically creates an Azure DevOps repository if it does not exist.
- Syncs the entire GitHub repository, including branches and tags, to Azure DevOps.
- Supports full repository history via
--allpush. - User-friendly: requires only Azure DevOps organization name and PAT.
- No additional configuration needed; GitHub repository name is used as default project and repo name.
Usage
- Add
AZURE_DEVOPS_PATto your repository secrets. - Use the Action in your workflow and provide your DevOps organization name.
- The Action will automatically handle project/repo creation and push all branches and tags.
Example .yml
name: Sync to Azure DevOps
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Sync GitHub repo to Azure DevOps
uses: GuyMicciche/SyncToAzureDevOps@v1.0.0
with:
organization: "dev.azure.com/yourorganization"
pat: ${{ secrets.AZURE_DEVOPS_PAT }}Notes
- Ensure your PAT has the following permissions:
- Build → Read & execute
- Code → Read, write, & manage
- Project and Team → Read, write, & manage
- Designed for seamless GitHub → Azure DevOps integration in CI/CD workflows.
Complete Step-By-Step Instructions
Follow these steps to create a PAT with the required permissions for the Sync to Azure DevOps GitHub Action.
1. Sign in to Azure DevOps
- Go to https://dev.azure.com and log in with your account.
2. Open User Settings
- Click User settings in the top-right corner → Personal access tokens.
- https://dev.azure.com/YOUR_ORGANIZATION/_usersSettings/tokens
3. Create a New PAT
- Under Personal access tokens, click New Token.
4. Fill in Basic Info
- Name: e.g.,
GitHub Sync Action - Organization: Select your Azure DevOps organization
- Expiration: Choose a suitable expiration (e.g., 90 days)
- Scopes: Select Custom defined
5. Set Required Permissions
| Area | Permissions | Access Level |
|---|---|---|
| Build | Execute | Read & execute |
| Code | All | Read, write & manage |
| Project and Team | All | Read, write & manage |
Make sure to check the boxes as shown above.
6. Create the PAT
- Click Create
- Copy the token immediately — this is the only time it will be shown.
7. Save the PAT in GitHub
- Go to your GitHub repository → Settings → Secrets and variables → Actions → New repository secret
- Name it:
AZURE_DEVOPS_PAT - Paste the token value
- Click Add secret
8. Use the PAT in your Workflow
- name: Sync GitHub repo to Azure DevOps
uses: GuyMicciche/SyncToAzureDevOps@v1.0.0
with:
organization: "dev.azure.com/yourorganization"
pat: ${{ secrets.AZURE_DEVOPS_PAT }}