From 3017784d3892da7d86510ae345cefe5a07920cf4 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 22 Apr 2020 00:38:08 +0200 Subject: [PATCH] ci: fix deploy to github - don't add gitlab ssh key in push_master_to_github job - overwrite id_rsa_base64 instead of appending to it --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b34969fe..c54ef47ec 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,10 +61,11 @@ push_master_to_github: variables: GIT_STRATEGY: clone GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master + before_script: [] script: - mkdir -p ~/.ssh - chmod 700 ~/.ssh - - echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64 + - echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64 - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config