CI and forked projects


I am new to GitLab and wonder how to enable some things.

My workflow is as follows:

  • users can indirectly contribute to a main project thanks to merge requests from a forked project
  • each commit, tag, push, merge request in the main project runs a pipeline with test, build and deploy jobs
  • deploy jobs consist in pushing the build (after a tag creation only) to a remote server, say with a scp command

I am facing 2 issues:

  1. how to update the forked repository with changes in the main repository from the Gitlab UI ? (I cannot see the “Mirroring Repositories section” as explained in ?
  2. how to configure the CI process to prevent a forked project to upload its own builds to the remote server while it executes its own pipeline ?

My .gitlab-ci.yml file looks like this:

    - do_test
  stage: build
  - do_build
  stage: deploy
  - scp <file> <remote>
  - tags
  - master

Have you got some suggestions or solutions ?