Merge branch 'ml/mirror-to-github' into 'main'

Ml/mirror to github

See merge request naaice/tug!40
This commit is contained in:
Max Lübke 2025-10-15 10:25:37 +02:00
commit b6ce5a32f4

View File

@ -5,8 +5,8 @@ before_script:
stages:
- test
- release
- static_analyze
- doc
test:
stage: test
@ -22,8 +22,8 @@ test:
reports:
junit: build/test_results.xml
pages:
stage: doc
doc:
stage: release
image: python:slim
before_script:
- apt-get update && apt-get install --no-install-recommends -y graphviz imagemagick doxygen make
@ -39,6 +39,22 @@ pages:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
push:
stage: release
variables:
GITHUB_REPOSITORY: 'git@github.com:POET-Simulator/tug.git'
ORIGINAL_REPO_URL: 'https://git.gfz-potsdam.de/naaice/tug.git'
ORIGINAL_REPO_NAME: 'tug'
before_script:
# I know that there is this file env variable in gitlab, but somehow it does not work for me (still complaining about white spaces ...)
# Therefore, the ssh key is stored as a base64 encoded string
- mkdir -p ~/.ssh && echo $GITHUB_SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519
- ssh-keyscan github.com >> ~/.ssh/known_hosts
script:
- rm -rf $ORIGINAL_REPO_NAME.git
- git clone --mirror $ORIGINAL_REPO_URL "$ORIGINAL_REPO_NAME.git" && cd $ORIGINAL_REPO_NAME.git
- git push --mirror $GITHUB_REPOSITORY
lint:
stage: static_analyze
before_script: