This workflow syncs your repository with upstream changes from The-AI-Alliance/agent-lab-ui, preserving local changes during conflicts. It creates a new branch with the merged changes for review before merging into your main branch.
- Syncs with specific upstream tags
- Resolves merge conflicts in favor of your local changes
- Creates a new branch for each sync
- Preserves existing workflows and configuration
- Lists available upstream tags for reference
You need a PAT with proper permissions:
- Go to GitHub Settings > Developer Settings > Personal Access Tokens
- Click "Generate new token"
- Name:
Agent Lab Sync Token - Expiration: Recommended 90 days
- Select permissions:
- ✅
repo(Full control of private repositories) - ✅
workflow(Update GitHub Action workflows)
- ✅
- Click "Generate token"
- Copy the token value (you won't see it again)
- Go to your repository Settings > Secrets and variables > Actions
- Click "New repository secret"
- Name:
PAT - Value: Paste the token you copied
- Click "Add secret"
- Go to repository Settings > Actions > General
- Under "Workflow permissions":
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click "Save"
- Go to your repository's Actions tab
- Select "Sync Upstream with Conflict Resolution"
- Click "Run workflow"
- Provide inputs:
upstream_tag: The upstream tag to sync with (e.g.,v0.0.2-pre-alpha)new_branch: Name for the new branch (e.g.,sync/upstream-v0.0.2)
- Click "Run workflow"
| Parameter | Description | Example |
|---|---|---|
upstream_tag |
Tag from upstream repository | v0.0.2-pre-alpha |
new_branch |
New branch name for the sync | sync/upstream-v0.0.2 |
The workflow will:
- List available upstream tags
- Verify the specified tag exists
- Create a new branch
- Merge upstream changes
- Resolve conflicts in favor of local changes
- Commit the merge result
- Push to the new branch
- Review the new branch:
- Check for unexpected changes
- Verify conflict resolution
- Create a pull request to merge into your main branch
- Test changes before merging
The workflow lists available upstream tags in the "List available upstream tags" step. View these in the workflow logs:
Available tags in upstream:
v0.0.1
v0.0.2-pre-alpha
v0.0.2
v1.0.0-rc1
...
- Tag not found: Verify tag name matches exactly (use copy from available tags list)
- Permission errors: Ensure PAT has proper permissions and is added to secrets
- Merge conflicts: Review conflict resolution in the new branch
- Workflow not appearing: Check it's in
.github/workflows/sync-upstream.yml
- PATs should have minimum required permissions
- Rotate PATs periodically (every 90 days recommended)
- Never hardcode tokens in workflow files
- Review upstream changes before merging into main branch