From 50fa6bf47640d52b878e58a49b454a05ffdbd28e Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 9 Mar 2018 17:05:19 +0100 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 569217e..a9c864f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,2 +1,24 @@ -job1: - script: "/tmp/run.sh" +before_script: + - ssh-keyscan -t rsa,dsa,ecdsa github.com > /etc/ssh/ssh_known_hosts + +variables: + UPSTREAM_REPOSITORY: "git@github.com:h44z/atestproject.git" + UPSTREAM_BRANCH: "master" + +mirror-master: + stage: deploy + only: + - master + script: + - git remote add upstream $UPSTREAM_REPOSITORY || true + - git fetch upstream + - git push --progress upstream HEAD:$UPSTREAM_BRANCH + +mirror-tags: + stage: deploy + only: + - tags + script: + - git remote add upstream $UPSTREAM_REPOSITORY || true + - git fetch upstream + - git push --progress --tags upstream \ No newline at end of file