Home

Awesome

🚀 GitLab CI for GitHub Actions

GitHub Action for trigger gitlab-ci jobs.

Usage

Trigger New GitLab CI Job.

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. 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

How to get the project ID? going to your project’s Settings ➔ General under General project.

projectID

Example

Specific the GitLab host URL:

- 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:

- 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