Mirror of github project with gitlab runners

I have a gitlab instance setup on my server and I would like to mirror a github project in it publicly but run tests on my servers. How can I achieve this?

To specific tests on my runners I need to create a .gitlab-ci.yml file but since I am mirroring I cannot do so. Any suggestions?

I think you can accomplish by setting up a project in GitLab as “CI/CD for external repo” and setup your specific runners.

Here is the documentation https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/#doc-nav

Unfortunately that’s no good because of this step:

In GitHub, add a .gitlab-ci.yml to configure GitLab CI/CD.

I don’t have access to the github repo.

Any updated on this? I’m in the same boat.

I don’t have a solution but I do use a workaround. I have a clone of the project in github. Then I do CI/CD for that fork in gitlab. Since the fork is mine, I can add a .gitlab-ci.yml. On a regular basis I merge origin to my form --ff-only which works because they never had a gitlab-ci.yml in the first place.

1 Like