diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db9db7d001..466a609125 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,8 +105,15 @@ checkupdates_runner: - touch config.py - git config --global user.email "fdroidci@bubu1.eu" - git config --global user.name "F-Droid checkupdates bot" - - url_host=`git remote get-url origin | sed -e "s/https:\/\/gitlab-ci-token:.*@//g"` - - git remote set-url origin "https://gitlab-ci-token:${CI_GIT_PUSH_TOKEN}@${url_host}" + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - cp "${GITLAB_KNOWN_HOSTS}" ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - eval $(ssh-agent -s) + - echo "${CHECKUPDATES_SSH_DEPLOY_KEY}" | tr -d '\r' | ssh-add - + - url_host=$(echo "${CI_REPOSITORY_URL}" | sed -e 's|https\?://gitlab-ci-token:.*@|ssh://git@|g') + - echo "${url_host}" + - git remote set-url --push origin "${url_host}" script: - fdroid checkupdates --allow-dirty --auto --commit ${CHECKUPDATES_APPIDS} - git pull --rebase origin master