Update .gitlab-ci.yml file
This commit is contained in:
@@ -12,8 +12,39 @@ prepare_job:
|
||||
- 'git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gl.beaconborn.ru/bacon/translation-generator.git'
|
||||
- 'python3 translation-generator/main.py $CI_PROJECT_DIR'
|
||||
- 'git commit -m "Updated translate"'
|
||||
|
||||
after_script:
|
||||
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||
##
|
||||
## Run ssh-agent (inside the build environment)
|
||||
##
|
||||
- eval $(ssh-agent -s)
|
||||
##
|
||||
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
|
||||
## We're using tr to fix line endings which makes ed25519 keys work
|
||||
## without extra base64 encoding.
|
||||
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
|
||||
##
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
##
|
||||
## Create the SSH directory and give it the right permissions
|
||||
##
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
##
|
||||
## Assuming you created the SSH_SERVER_HOST_KEYS variable, uncomment the
|
||||
## following two lines.
|
||||
##
|
||||
- echo "$SSH_SERVER_HOST_KEYS" >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
- git config --global user.email 'bot@hzdr.de'
|
||||
- git config --global user.name 'Bot'
|
||||
- 'git push -o ci.skip https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git origin HEAD:$CI_COMMIT_BRANCH'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- 'data/localization/ru.po'
|
||||
|
||||
Reference in New Issue
Block a user