Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2021-10-06 14:08:23 -0400
committerMike Gerwitz <mike.gerwitz@ryansg.com>2021-10-07 13:09:40 -0400
commit072a501ed533ed99b116f1f2b06eb22c489bbb96 (patch)
treeb7daa1f3ab98477294ca5e79233b9cbb17387ad0 /.gitlab-ci.yml
parent7f5064c66556dd24d64097a61c2890d611d7e044 (diff)
downloadtame-072a501ed533ed99b116f1f2b06eb22c489bbb96.tar.gz
tame-072a501ed533ed99b116f1f2b06eb22c489bbb96.tar.bz2
tame-072a501ed533ed99b116f1f2b06eb22c489bbb96.zip
.gitlab-ci.yml: Merge to main after successful stage pipeline
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e7a437f..3a50426 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,3 +52,19 @@ pages:
expire_in: 30 min
only:
- main
+
+ci:merge:
+ stage: deploy
+ script:
+ - eval $(ssh-agent -s)
+ - ssh-add <(echo "$SSH_PRIVATE_KEY")
+ - git config user.email "gitlab-ci@localhost"
+ - git config user.name "GitLab CI"
+ - git checkout main
+ - git reset --hard origin/main
+ - git merge --ff origin/stage
+ # Should trigger pipeline
+ - git push http://ci:$STAGE_MERGE_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:main
+ only:
+ - stage
+