-
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
Showing
12 changed files
with
28,334 additions
and
173 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,18 @@ | ||
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 |
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,130 +1,5 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
#dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
node_modules | ||
.idea | ||
npm-debug.log | ||
.vscode | ||
.cert |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 GitHub Actions | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,2 +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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
name: 'Trigger GitLab Pipeline' | ||
description: 'Triggers a GitLab Pipeline' | ||
author: "mbwali" | ||
branding: | ||
icon: 'git-commit' | ||
color: 'orange' | ||
inputs: | ||
PROJECT_ID: | ||
description: 'The ID of the GitLab project' | ||
description: 'The ID or URL-encoded path of the project owned by the authenticated user.' | ||
required: true | ||
default: '' | ||
GITLB_TRIGGER_TOKEN: | ||
description: 'The GitLab Trigger Token' | ||
required: true | ||
default: '' | ||
REF_NAME: | ||
description: 'The GitLab branch or tag name' | ||
required: true | ||
required: false | ||
default: 'main' | ||
URL: | ||
description: 'The GitLab URL' | ||
required: true | ||
required: false | ||
default: 'gitlab.com' | ||
PIPELINE_VARIABLES: | ||
description: 'A map of key-valued strings containing the pipeline variables. For example: { VAR1: "value1", VAR2: "value2" }.' | ||
required: false | ||
# access_token: | ||
# description: 'Pipeline Access Token, see https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html' | ||
# required: false | ||
# default: '' | ||
outputs: | ||
# status: | ||
# description: 'The status of the pipeline.' | ||
web_url: | ||
description: 'The URL of the pipeline.' | ||
runs: | ||
using: 'node18' | ||
main: 'index.js' | ||
using: 'node20' | ||
main: 'dist/index.js' |
Oops, something went wrong.