Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enomotodev/gitlabci-composer-update-mr
Create MergeRequest of composer update in GitLabCI
https://github.com/enomotodev/gitlabci-composer-update-mr
composer gitlab gitlab-ci php
Last synced: 2 months ago
JSON representation
Create MergeRequest of composer update in GitLabCI
- Host: GitHub
- URL: https://github.com/enomotodev/gitlabci-composer-update-mr
- Owner: enomotodev
- Created: 2019-01-22T01:53:09.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2021-09-30T03:46:11.000Z (about 3 years ago)
- Last Synced: 2024-09-18T11:30:54.941Z (3 months ago)
- Topics: composer, gitlab, gitlab-ci, php
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitlabci-composer-update-mr
[![Latest Stable Version](https://poser.pugx.org/enomotodev/gitlabci-composer-update-mr/v/stable.png)](https://packagist.org/packages/enomotodev/gitlabci-composer-update-mr)
[![Build Status](https://api.travis-ci.org/enomotodev/gitlabci-composer-update-mr.svg?branch=master)](https://travis-ci.org/enomotodev/gitlabci-composer-update-mr)## Installation
```
$ composer require enomotodev/gitlabci-composer-update-mr
```## Prerequisites
The application on which you want to run continuous composer update must be configured to be built on GitLabCI.
## Usage
### Setting GitLab personal access token to GitLabCI
GitLab personal access token is required for sending merge requests to your repository.
1. Go to [your account's settings page](https://gitlab.com/profile/personal_access_tokens) and generate a personal access token with "api" scope
1. On GitLab dashboard, go to your application's "Settings" -> "CI /CD" -> "Environment variables"
1. Add an environment variable `GITLAB_API_PRIVATE_TOKEN` with your GitLab personal access token### Configure .gitlab-ci.yml
Configure your `.gitlab-ci.yml` to run `gitlabci-composer-update-mr`, for example:
```yaml
job:
except:
- schedules
script:
# snipjob:on-schedule:
image: composer:latest
only:
- schedules
script:
- "composer global require enomotodev/gitlabci-composer-update-mr"
- "$COMPOSER_HOME/vendor/bin/gitlabci-composer-update-mr master"
```NOTE: Please make sure you replace `` and `` with yours.
### Setting Schedule
1. On GitLab dashboard, go to your application's "Schedules" -> "New schedule"
1. Create new schedule and save## CLI command references
General usage:
```
$ gitlabci-composer-update-mr
```## License
gitlabci-composer-update-mr is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)