Commit 7adc89ad authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Merge branch 'add-ssh-key' into 'latest'

feat: add ssh key to committing stage

See merge request core-services/jekyll-theme-lcsb-default!39
parents 9059bb17 775b5468
......@@ -39,12 +39,21 @@ pages:
# This will tag the repository when the version-file changes and the theme successfully builds
auto-tag:
stage: deploy
variables:
VERSION_FILE: "lib/jekyll-theme-lcsb-default.rb"
TARGET_BRANCH: latest
image: alpine:3.1
only:
changes:
- "lib/jekyll-theme-lcsb-default.rb"
before_script:
- 'which ssh-agent || ( apk add --update openssh )'
- eval $(ssh-agent -s)
- echo "$SSHPRIVKEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
variables:
VERSION_FILE: "lib/jekyll-theme-lcsb-default.rb"
TARGET_BRANCH: latest
script:
# Make sure that it is on latest, otherwise exit. THIS IS A WORKAROUND, AS HAVING BOTH ONLY AND RULES IS NOT POSSIBLE
- '[[ "${CI_COMMIT_BRANCH:-1}" == "$TARGET_BRANCH" ]] && echo "On correct branch ($CI_COMMIT_BRANCH)" || exit 0'
......
# frozen_string_literal: true
# Note: keep the format of NUMBER.NUMBER.NUMBER (where NUMBER is [0-9]+) - otherwise Gitlab-CI could fail to detect the version (see .gitlab-ci.yml) and auto-tag job
# Note: keep the format of NUMBER.NUMBER.NUMBER (where NUMBER is [0-9]+)
# Otherwise Gitlab-CI could fail to detect the version (see .gitlab-ci.yml) and auto-tag job
module Theme
VERSION = "0.3.17"
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment