diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46e374d0ec7efea52dec2349623314d28caee154..cbdb79dca88735d6ba458b060a16c012b78e1925 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,9 @@ autoupdate: rules: - if: '$RUN_AUTOUPDATE == "1"' script: - - git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout + - mkdir -p ~/.ssh && chmod 0700 ~/.ssh && echo "$SSH_DEPLOY_KEY" > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519 + - echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts + - git clone "git@${CI_SERVER_SHELL_SSH_HOST}:${CI_PROJECT_PATH}.git" autoupdate-checkout - | set -e cd autoupdate-checkout @@ -29,7 +31,9 @@ update_release_tags: rules: - if: '$RUN_AUTOUPDATE != "1" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG == null' script: - - git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout + - mkdir -p ~/.ssh && chmod 0700 ~/.ssh && echo "$SSH_DEPLOY_KEY" > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519 + - echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts + - git clone "git@${CI_SERVER_SHELL_SSH_HOST}:${CI_PROJECT_PATH}.git" autoupdate-checkout - | set -e cd autoupdate-checkout