stages: - prepare # List of stages for jobs, and their order of execution - release image: python:3.10 prepare_job: stage: prepare script: - 'pip install requests' - '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" - 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' release_job: needs: - job: prepare_job artifacts: true stage: release # It only runs when *both* jobs in the test stage complete successfully. image: registry.gitlab.com/gitlab-org/release-cli:latest only: # - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" refs: - testing - ^tags changes: - data/**/* - modinfo.lua - thumb.png - test.txt script: - echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA branch $CI_COMMIT_BRANCH" release: tag_name: v2.0.$CI_PIPELINE_IID name: 'WPE 2.0_$CI_COMMIT_SHORT_SHA' description: '$CI_COMMIT_MESSAGE'