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
This commit is contained in:
Ivan Grokhotkov
2020-04-22 00:38:08 +02:00
parent 0c525430a9
commit 3017784d38

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