A powerful GitHub Action that provides bi-directional synchronization between GitHub and GitLab repositories. Keep your projects in sync across platforms automatically.
- 🔄 Bi-directional sync between GitHub and GitLab
- 🌳 Branches, PRs/MRs, issues, releases, and tags
- 💬 Enhanced comment synchronization with proper attribution
- ⚙️ Highly configurable with logical priority-based defaults
- 🔒 Secure with token-based authentication
- 🏷️ Smart labeling of synced content
- 🧠 Intelligent dependency management - automatically enables required features
- ⏱️ Chronological sync order - respects dependencies between operations
Create .github/workflows/sync.yml
:
name: Sync to GitLab
on:
push:
branches: [main]
pull_request:
types: [opened, closed, reopened]
issues:
types: [opened, closed, reopened]
release:
types: [published]
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Sync with GitLab
uses: OpenSaucedHub/[email protected]
with:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Add these secrets to your GitHub repository:
GITLAB_TOKEN
: GitLab personal access token withapi
scopeGH_TOKEN
: GitHub personal access token withworkflow
scope (required for syncing workflow files)
Warning
If your sync includes workflow files (.github/workflows/
), you must use a Personal Access
Token with the workflow
scope instead of the default GITHUB_TOKEN
. The default token cannot
modify workflow files for security reasons.
Create .github/sync-config.yml
for custom settings:
gitlab:
enabled: true
projectId: 12345 # Your GitLab project ID
github:
enabled: true
That's it! The action uses intelligent defaults:
- ✅ Enabled by default: Branches (with history sync), Tags, Releases
- ❌ Disabled by default: Pull Requests, Issues, Comments (can be noisy)
- 🧠 Smart dependencies: Automatically enables required features (e.g., tags when releases are enabled)
🎉
For detailed configuration and advanced usage:
- Configuration Guide - Complete configuration options and examples
- Token Setup - Detailed token permissions and setup instructions
- Advanced Examples - Complex configuration scenarios
- Troubleshooting - Common issues and solutions
- 📋 Configuration Examples - Ready-to-use configuration templates
- 🐛 Report Issues - Found a bug or have a feature request?
- 💬 Discussions - Ask questions and share ideas
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see the LICENSE file for details.
Built with ❤️ using TypeScript and Bun
Inspired by the need for seamless cross-platform development workflows