GithubHelp home page GithubHelp logo

digital-blueprint / gitlab-pipeline-trigger-action Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 457 KB

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

License: MIT License

JavaScript 95.13% Makefile 2.51% Nix 2.23% Shell 0.14%
digital-blueprint github-action gitlab gitlab-ci

gitlab-pipeline-trigger-action's Introduction

GitLab Pipeline trigger action

GitHub | GitHub Marketplace

Test action

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

    ACTION-->>GITHUB: Final pipeline status
Loading

Inputs

host

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

id

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.

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

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.

variables

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

Outputs

status

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

web_url

The URL of the pipeline, for example https://gitlab.com/foo/bar/pipelines/47.

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"}'

gitlab-pipeline-trigger-action's People

Contributors

borutmrak avatar lazka avatar nepalevov avatar pbek avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lazka s4ase

gitlab-pipeline-trigger-action's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
.github/workflows/test.yml
  • actions/checkout v4
npm
package.json
  • @actions/core ^1.10.0
  • @vercel/ncc ^0.38.0
  • eslint ^9.0
  • globals ^15.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.