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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This GitLab CI runner image allows to deploy a GitLab project to a remote Git repo (useful for Dokku, Heroku, Deis, etc.)
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-----
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
push ssh://dokku@dokku.me:8022/myapp
By default, git push will be forced. You can disable force push by setting environment variable DISABLE_FORCE_PUSH
to any value.