Skip to content
Snippets Groups Projects
Commit f5d7ee23 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

ci: Move git setup into script

parent 54d4c9f8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
eval $(ssh-agent -s)
echo "$2" | tr -d '\r' | ssh-add - > /dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan "$1" >> ~/.ssh/known_hosts
git config --global user.email "$CI_GIT_USER_EMAIL"
git config --global user.name "$CI_GIT_USER_USERNAME"
......@@ -128,14 +128,8 @@ deploy-flatpak:
rules:
- if: '$CI_COMMIT_TAG'
before_script:
- eval $(ssh-agent -s)
- echo "${FLATHUB_DEPLOY_KEY}" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- .ci/prepare_git.sh github.com ${FLATHUB_DEPLOY_KEY}
script:
- git config --global user.email "$CI_GIT_USER_EMAIL"
- git config --global user.name "$CI_GIT_USER_USERNAME"
- git clone git@github.com:flathub/org.gajim.Gajim.git
- cd org.gajim.Gajim
- mv ../flatpak/org.gajim.Gajim.yaml org.gajim.Gajim.yaml
......@@ -152,14 +146,8 @@ publish-release:
rules:
- if: '$CI_COMMIT_TAG'
before_script:
- eval $(ssh-agent -s)
- echo "${WEBSITE_DEPLOY_KEY}" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dev.gajim.org >> ~/.ssh/known_hosts
- .ci/prepare_git.sh dev.gajim.org ${WEBSITE_DEPLOY_KEY}
script:
- git config --global user.email "$CI_GIT_USER_EMAIL"
- git config --global user.name "$CI_GIT_USER_USERNAME"
- git clone git@dev.gajim.org:gajim/website.git
- cd website
- git checkout master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment