From c13777f5767085a8712a74d06fbbc22e7e4457af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Wed, 15 Oct 2025 10:32:46 +0200 Subject: [PATCH 1/2] ci(github-mirror): add automated repository mirroring --- .gitlab-ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5934407..c5674382 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ before_script: stages: - test + - release test: stage: test @@ -19,4 +20,21 @@ test: paths: - _build/test_results.xml reports: - junit: _build/test_results.xml \ No newline at end of file + junit: _build/test_results.xml + +push: + stage: release + variables: + GITHUB_REPOSITORY: 'git@github.com:POET-Simulator/iphreeqc.git' + ORIGINAL_REPO_URL: 'https://git.gfz-potsdam.de/naaice/iphreeqc.git' + ORIGINAL_REPO_NAME: 'iphreeqc' + before_script: + - apt-get update -y && apt-get install -y git openssh-client + # 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 From 86411e641556dc98e57ed38328b566129320f912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Tue, 28 Oct 2025 11:05:17 +0100 Subject: [PATCH 2/2] ci(gitlab): update github mirror repository --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5674382..4c4de26e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ test: push: stage: release variables: - GITHUB_REPOSITORY: 'git@github.com:POET-Simulator/iphreeqc.git' + GITHUB_REPOSITORY: 'git@github.com:POET-Simulator/litephreeqc.git' ORIGINAL_REPO_URL: 'https://git.gfz-potsdam.de/naaice/iphreeqc.git' ORIGINAL_REPO_NAME: 'iphreeqc' before_script: