This repository is an example to enable mirroring of Github repository to drupal.org project hosted on Gitlab. This will updated your Drupal.org's project repository with the changes in your Github repository, not vice-versa. This deployments/pushes can be check via "Actions" tab on your Github repository.
Sometimes, we host our Drupal.org projects on Github for better collaborations and workflows and we maintain it on Github and then push the changes to Drupal.org. But this is a manual task, so we need to find a solution which automates this process.
This repository uses Github Actions workflow.
- .github folder contains the workflows yml files.
- gitlabintegrations.yml contains the github action configurations.
- Clone this repository and simply update the https://github.com/navneet0693/gitlab-github-integrations/blob/main/.github/workflows/gitlabIntegrations.yml#L15 to the URL for your destination repository.
- Copy your SSH's PRIVATE key (for example: ~/.ssh/id_rsa) and add an Actions secret at https://github.com/<user_name>/<repository_name>/settings/secrets/actions
- Make sure your Github profile's public ssh key is also added to your profile in git access on Drupal.org at https://www.drupal.org/user//ssh-keys.
- For example, you can see actions here: https://github.com/navneet0693/gitlab-github-integrations/actions
Yes, it non-primary branches also sync.
Unfortunately, it will be removed.
3. What happens to a branch in Gitlab if a branch with the same name is created on GitHub? What should happen?
It remains same, but probably if the commits different then Github will prevail.
Yes, tags are also synced.
It will be removed from Gitlab as well.
Yes, they will be synced as well and will be present in both Github and Gitlab.
Yes, they will be synced as well automatically. Merge request, however will not be synced.