Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appleboy/gitlab-ci-action
GitHub Action that trigger gitlab CI build.
https://github.com/appleboy/gitlab-ci-action
github-actions gitlab gitlab-ci
Last synced: 24 days ago
JSON representation
GitHub Action that trigger gitlab CI build.
- Host: GitHub
- URL: https://github.com/appleboy/gitlab-ci-action
- Owner: appleboy
- License: mit
- Created: 2019-02-28T04:24:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-13T03:03:47.000Z (over 3 years ago)
- Last Synced: 2024-04-14T09:48:02.088Z (7 months ago)
- Topics: github-actions, gitlab, gitlab-ci
- Language: Dockerfile
- Homepage: https://github.com/marketplace/actions/trigger-gitlab-ci-job
- Size: 727 KB
- Stars: 65
- Watchers: 5
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Trigger multiple GitLab CI Pipeline
- fucking-awesome-actions - Trigger multiple GitLab CI Pipeline
- awesome-workflows - Trigger multiple GitLab CI Pipeline
README
# 🚀 GitLab CI for GitHub Actions
[GitHub Action](https://github.com/features/actions) for trigger [gitlab-ci](https://about.gitlab.com/gitlab-ci) jobs.
## Usage
Trigger New GitLab CI Job.
```yml
name: trigger gitlab job
on: [push]
jobs:build:
name: Build
runs-on: ubuntu-latest
steps:
- name: trigger Job
uses: appleboy/gitlab-ci-action@master
with:
host: "http://example.com"
token: ${{ secrets.TOKEN }}
project_id: 100```
## GitLab Setting
See the detail documentation for [Triggering pipelines through the API](https://docs.gitlab.com/ee/ci/triggers/). How to get the token from a new trigger? You can add a new trigger by going to your project’s `Settings ➔ CI/CD` under Triggers.
![token](./images/token.png)
How to get the project ID? going to your project’s `Settings ➔ General` under General project.
![projectID](./images/projectID.png)
## Example
Specific the GitLab host URL:
```yml
- name: trigger Job
uses: appleboy/gitlab-ci-action@master
with:
host: "http://example.com"
token: ${{ secrets.TOKEN }}
debug: true
project_id: 100
```Other specific `branch` or `tag` name:
```yml
- name: trigger Job
uses: appleboy/gitlab-ci-action@master
with:
host: "http://example.com"
token: ${{ secrets.TOKEN }}
debug: true
project_id: 100
ref: 'v1.0.0'
```## Input variables
* host - Optional. gitlab-ci base url, default as `https://gitlab.com`
* token - Required. A unique trigger token can be obtained when [adding a new trigger](https://docs.gitlab.com/ee/ci/triggers/#adding-a-new-trigger).
* project_id - Required. project id.
* ref - Optional. Triggers can be used to force a pipeline rerun of a specific ref (`branch` or `tag`) with an API call. Default as `master`.
* debug - Optional. show the debug message.