Commit 9d50eecb authored by Дмитрий Сафронов's avatar Дмитрий Сафронов
Browse files

Merge branch 'trunk' into 'master'

.gitlab-ci.yml

See merge request tools/sync-fork!18
parents 33096d05 c6701feb
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ sync:
    - ( eval $(ssh-agent -s); echo "${SSH_PULL_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null && mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config ) || true
    - ( eval $(ssh-agent -s); echo "${SSH_PUSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null && mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config ) || true
  script:
    - git clone "${GIT_PUSH_URL}" /tmp/repo && cd /tmp/repo && git checkout "${GIT_PUSH_BRANCH}"
    - git remote add upstream "${GIT_PULL_URL}" && git pull --ff-only upstream "${GIT_PULL_BRANCH}"
    - git pull --ff-only upstream "${GIT_PULL_BRANCH}"
    - git push origin "${GIT_PUSH_BRANCH}"
    - git clone "${GIT_PUSH_URL}" /tmp/repo && cd /tmp/repo && git checkout "${GIT_PUSH_BRANCH:-master}"
    - git remote add upstream "${GIT_PULL_URL}" && git pull --ff-only upstream "${GIT_PULL_BRANCH:-master}"
    - git pull --ff-only upstream "${GIT_PULL_BRANCH:-master}"
    - git push origin "${GIT_PUSH_BRANCH:-master}"