$ composer require enomotodev/gitlabci-composer-update-mr
The application on which you want to run continuous composer update must be configured to be built on GitLabCI.
GitLab personal access token is required for sending merge requests to your repository.
- Go to your account's settings page and generate a personal access token with "api" scope
- On GitLab dashboard, go to your application's "Settings" -> "CI /CD" -> "Environment variables"
- Add an environment variable
GITLAB_API_PRIVATE_TOKEN
with your GitLab personal access token
Configure your .gitlab-ci.yml
to run gitlabci-composer-update-mr
, for example:
job:
except:
- schedules
script:
# snip
job:on-schedule:
image: composer:latest
only:
- schedules
script:
- "composer global require enomotodev/gitlabci-composer-update-mr"
- "$COMPOSER_HOME/vendor/bin/gitlabci-composer-update-mr <username> <email> master"
NOTE: Please make sure you replace <username>
and <email>
with yours.
- On GitLab dashboard, go to your application's "Schedules" -> "New schedule"
- Create new schedule and save
General usage:
$ gitlabci-composer-update-mr <git username> <git email address> <git base branch>
gitlabci-composer-update-mr is open-sourced software licensed under the MIT license