-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mojib
committed
Apr 7, 2024
1 parent
22728d4
commit 1e298a8
Showing
4 changed files
with
94 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Test | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Tests | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: Build & Lint | ||
run: | | ||
npm ci | ||
npm run build | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,60 @@ | ||
# gitlab-cd-trigger | ||
# GitLab CD Pipeline trigger | ||
|
||
Github Action to trigger Gitlab CD pipeline | ||
|
||
[GitHub](https://github.com/mb-wali/gitlab-cd-trigger) | | ||
[GitHub Marketplace](https://github.com/marketplace/actions/gitlab-cd-trigger) | ||
|
||
[![Test action](https://github.com/mb-wali/gitlab-cd-trigger/actions/workflows/main.yml/badge.svg)](https://github.com/mb-wali/gitlab-cd-trigger/actions/workflows/main.yml) | ||
|
||
This GitHub action triggers and waits for a [GitLab pipeline](https://docs.gitlab.com/ee/ci/pipelines/) 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. | ||
|
||
## Inputs | ||
|
||
### `URL` | ||
|
||
The GitLab URL to trigger the pipeline on. Default `gitlab.com`. | ||
|
||
### `PROJECT_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_NAME` | ||
|
||
**Required** The branch or tag to run the pipeline on. | ||
|
||
### `GITLB_TRIGGER_TOKEN` | ||
|
||
**Required** The [GitLab pipeline trigger token](https://docs.gitlab.com/ee/ci/triggers/index.html#create-a-trigger-token) | ||
to trigger the pipeline. | ||
|
||
|
||
### `PIPELINE_VARIABLES` | ||
|
||
A map of key-valued strings containing the pipeline variables. For example: `{ VAR1: "value1", VAR2: "value2" }`.. Default `"World"`. | ||
|
||
## Outputs | ||
|
||
### `web_url` | ||
|
||
The URL of the pipeline, for example `https://gitlab.com/foo/bar/pipelines/47`. | ||
|
||
## Example usage | ||
|
||
```yaml | ||
uses: digital-blueprint/gitlab-pipeline-trigger-action@v1 | ||
with: | ||
URL: 'gitlab.example.com' | ||
GITLB_TRIGGER_TOKEN: ${{ secrets.DEPLOY_TRIGGER_TOKEN }} | ||
PROJECT_ID: '123' | ||
REF_NAME: 'main' | ||
PIPELINE_VARIABLES: '{"VAR1":"value1","VAR2":"value2"}' | ||
``` | ||
https://github.com/digital-blueprint/gitlab-pipeline-trigger-action | ||
https://www.youtube.com/watch?v=N26xgQ7kLKo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters