From 8b39c5f8c9ea92b1e590ca6092a339d8ae286dd4 Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Sat, 29 Mar 2025 13:51:16 +0100 Subject: [PATCH] Use Node image and streamline Git configuration steps --- .gitlab-ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3790266..8c6de88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,16 +100,15 @@ deploy: sync_branches: stage: sync - image: alpine/git:latest + image: node:20 # <-- reuse existing node image rules: - if: '$CI_COMMIT_BRANCH == "production"' + before_script: + - git config --global user.email "gitlab-ci@rheinsw.com" + - git config --global user.name "GitLab CI" script: - - | - git config --global user.email "gitlab-ci@rheinsw.com" - git config --global user.name "RheinSW GitLab CI" - git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" - - git checkout dev - git pull origin dev - git merge --no-ff origin/production - git push origin dev + - git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" + - git checkout dev + - git pull origin dev + - git merge --no-ff origin/production + - git push origin dev