Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-commit

GitHub Action

GitLab Pipeline Trigger

v1.0.1

GitLab Pipeline Trigger

git-commit

GitLab Pipeline Trigger

Triggers and waits for a GitLab pipeline to complete

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitLab Pipeline Trigger

uses: digital-blueprint/gitlab-pipeline-trigger-action@v1.0.1

Learn more about this action in digital-blueprint/gitlab-pipeline-trigger-action

Choose a version

GitLab Pipeline trigger action

GitHub

This GitHub action triggers and waits for a GitLab pipeline to complete.

You can for example use this action to trigger a deployment pipeline on a private GitLab server after a successful build pipeline and wait for the deployment (with possible End2End tests) to finish, so you would get a notification if the deployment failed.

Inputs

host

The GitLab host to trigger the pipeline on. Default gitlab.com.

id

Required The ID or URL-encoded path of the project owned by the authenticated user.

ref

Required The branch or tag to run the pipeline on.

trigger_token

Required The GitLab pipeline trigger token to trigger the pipeline.

access_token

Required The GitLab pipeline access token to access the pipeline via the API. You need the read_api and read_repository scopes with Guest role for this token.

variables

A map of key-valued strings containing the pipeline variables. For example: { VAR1: "value1", VAR2: "value2" }.. Default "World".

Outputs

status

The last status of the pipeline. See GitLab project pipelines for more information about which status values there are.

Example usage

uses: digital-blueprint/gitlab-pipeline-trigger-action@v1
with:
  host: 'gitlab.example.com'
  trigger_token: ${{ secrets.DEPLOY_TRIGGER_TOKEN }}
  access_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
  id: '123'
  ref: 'main'
  variables: '{"VAR1":"value1","VAR2":"value2"}'

Build action

You need to run this after you made changes to the action.

npm run build

Then commit the changes to the dist folder.