Skip to content

aramirol/git-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Sync

git-sync

GitHub tag (latest by date) GitHub

Git Sync is a tool that allows you to synchronize GitHub repositories with GitLab.

Requirements

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

Configure

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 }}

License

MIT License

Take a look at LICENSE for the full text.