checkupdates: use ssh deploy key

closes fdroid/fdroiddata#2073
This commit is contained in:
Marcus Hoffmann 2020-06-24 22:33:09 +02:00
parent 361578b61f
commit 543979b083

View file

@ -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