Git Sync is a tool that allows you to synchronize GitHub
repositories with GitLab
.
Add the following secrets in your GitHub repository
:
Name | Value |
---|---|
GITLAB_URL | https://gitlab.com/<<username>>/<<project>> |
GITLAB_USERNAME | gitlab username |
GITLAB_TOKEN | gitlab token |
If you need info about how to create the token, please go to GitLab Personal Access Token.
Make sure that the remote repository branch is not protected or allows for force push. More info in GitLab Protected Branches
Use GitHub Actions
to configure a new workflow
that sync your GitHub repository to GitLab.
Ensure set up a workflow yourself and copy the following template:
name: git-sync
on:
- push
- delete
jobs:
sync:
runs-on: macos-latest
name: Git Sync
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: aramirol/git-sync@v1.0
with:
gitlab-url: ${{ secrets.GITLAB_URL }}
gitlab-username: ${{ secrets.GITLAB_USERNAME }}
gitlab-token: ${{ secrets.GITLAB_TOKEN }}
MIT License
Take a look at LICENSE for the full text.