This GitHub action triggers and waits for a GitLab pipeline to complete.
You can for example use this action in your GitHub workflow 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.
sequenceDiagram
    participant GITHUB as GitHub Actions
    participant ACTION as Action
    participant GITLAB as GitLab CI
    GITHUB->>ACTION: Run action
    ACTION->>GITLAB: Trigger a new pipeline
loop Every 15 seconds
    ACTION->>GITLAB: Poll pipeline status
    GITLAB-->>ACTION: Current pipeline status
end
    opt download_artifacts is enabled
        ACTION->>GITLAB: Poll for artifacts
        GITLAB-->>ACTION: Download artifacts
        ACTION->>GITHUB: Save artifacts locally
    end
    ACTION-->>GITHUB: Final pipeline status
    The GitLab host to trigger the pipeline on. Default gitlab.com.
Required The ID or path of the project owned by the authenticated user. You will find the Project ID in the General Settings of your GitLab project.
Required The branch or tag to run the pipeline on.
Required The GitLab pipeline trigger token to trigger the pipeline.
The GitLab pipeline access token
to access the pipeline via the API. You need the read_api and read_repository scopes with Reporter role for this token.
For public projects you don't need to provide an access token.
Note: Required when download_artifacts is enabled.
A map of key-valued strings containing the pipeline variables. For example: { VAR1: "value1", VAR2: "value2" }. The value has to be valid JSON. If not set the default is {}.
Whether to download artifacts generated by the pipeline. Default false.
Note: Requires access_token to be set.
Whether to download artifacts even when the pipeline fails. Default true.
Note: Requires both access_token and download_artifacts to be enabled.
Whether to fail the action if no artifacts are found. Default false.
Note: Requires download_artifacts to be enabled. Useful for ensuring pipelines generate expected artifacts.
Whether to download job console output. Default false.
Note: Requires access_token to be set. Downloads console output from all pipeline jobs independently of artifacts.
Path where to save downloaded artifacts and logs. Defaults to ./downloads.
Whether to enable verbose logging. When disabled, only generic messages are shown without
potentially sensitive information like URLs, IDs, or names. Default false.
The last status of the pipeline. See GitLab project pipelines for more information about which status values there are.
The URL of the pipeline, for example https://gitlab.com/foo/bar/pipelines/47.
Whether artifacts were successfully downloaded. Only set when download_artifacts is enabled.
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"}'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"}'
    download_artifacts: 'true'
    download_path: './build-artifacts'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"}'
    download_job_logs: 'true'
    download_path: './pipeline-logs'When download_artifacts is enabled and access_token is provided, the action will download artifacts based on the pipeline status:
- Pipeline succeeds: Artifacts are downloaded automatically.
 - Pipeline fails: The artifacts are downloaded if 
download_artifacts_on_failureis enabled. Defaulttrue. 
Artifact Validation:
- If 
fail_if_no_artifactsis enabled, the action will fail if no artifacts are found. - This helps ensure pipelines generate expected outputs and catch configuration issues early.
 
Job Logs:
- If 
download_job_logsis enabled, console output from all jobs will be downloaded. - Logs are saved as 
job.logfiles in each job's directory. - This provides complete visibility into pipeline execution for debugging.
 - Job log downloading is independent of artifact downloading.
 
The action will:
- Fetch all jobs from the completed pipeline;
 - Identify jobs that have artifacts;
 - Download artifacts from each job if 
download_artifactsis enabled; - Extract the artifacts to the specified 
download_path; - Organize artifacts by job (each job gets its own subdirectory);
 - Download job console logs if 
download_job_logsis enabled; - Save logs as 
job.logfiles in each job's directory. 
The artifacts and logs are organized as follows:
download_path/
├── job_123_job_name_1/
│   ├── artifacts/       # Artifacts subdirectory (if download_artifacts enabled)
│   │   ├── artifact1.txt
│   │   └── artifact2.txt
│   └── job.log          # Console output (if download_job_logs enabled)
├── job_124_job_name_2/
│   ├── artifacts/       # Artifacts subdirectory (if download_artifacts enabled)
│   │   ├── build/
│   │   └── dist/
│   └── job.log          # Console output (if download_job_logs enabled)
└── ...