IlyaSemenov/gitlab-ci-git-push

Name: gitlab-ci-git-push

Description: Gitlab CI runner image that pushes to a remote Git repo (Dokku, Heroku, Deis, etc.)

Created: 2016-09-02 10:59:01.0

Updated: 2017-12-24 23:01:28.0

Pushed: 2017-11-17 03:28:47.0

Homepage: null

Size: 6

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

GitLab CI runner that pushes to git

This GitLab CI runner image allows to deploy a GitLab project to a remote Git repo (useful for Dokku, Heroku, Deis, etc.)

How to use

Create .gitlab-ci.yml:

e: ilyasemenov/gitlab-ci-git-push

es:
deploy

oy to production:
age: deploy
vironment: production
ly:
- master
ript: git-push dokku@dokku.me:myapp

Go to GitLab > Project > Settings > CI/CD Pipelines > Secret Variables, and add a variable SSH_PRIVATE_KEY:

-BEGIN RSA PRIVATE KEY-----

-END RSA PRIVATE KEY-----
Pushing to a branch other than master

By default, git-push will push to branch master of a remote repository (that's what Dokku wants). You can override this with:

push user@git.host:repo branch
Pushing to Git running on a non-standard port
push ssh://dokku@dokku.me:8022/myapp
Not doing force push

By default, git push will be forced. You can disable force push by setting environment variable DISABLE_FORCE_PUSH to any value.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.