Docker container designed to create a pipeline that automatically pulls mirror repositories into projects for GitLab CE.
- In the mirror group, create a new project and specify the source git repository's URL in its description.
- ...
- Enjoy the benefits!
- Create group in gitlab for mirrored repos.
- Create a repository with a pipeline:
#.gitlab-ci.yml
---
stages:
- mirror
mirror_repositories:
stage: mirror
image:
name: ghcr.io/oldtyt/gitlab-pull-mirror
entrypoint: [""]
variables:
GITLAB_API_URL: "https://gitlab.com/"
GIT_STRATEGY: none
GITLAB_GROUP: MY_MIRRORED_GITLAB_GROUP
script:
- /app/entrypoint.sh
- Generate a CI/CD variable named
GITLAB_API_TOKEN
by visiting this page. - Set up a pipeline schedule by navigating to: CI/CD -> Pipeline schedules -> New schedule.
- Optional: Add your
SSH_KEY_PRIVATE
as a CI/CD variable.