This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create workflow yml for github actions (#61)
* Create workflow yml for github actions * Update typo in secrets * Trigger gitlab ci pipeline * Add stable tag in push trigger * Update GITHUB_REF var name
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 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,41 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Trigger GitLab CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- gitlab-trigger-test | ||
tags: | ||
- v* | ||
- stable | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Trigger GitLab CI | ||
env: | ||
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }} | ||
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }} | ||
run: | | ||
echo Running on ref ${GITHUB_REF##*/} | ||
echo Trigger CI pipeline | ||
curl -X POST \ | ||
-F token=${GITLAB_CI_TRIGGER_TOKEN} \ | ||
-F "ref=master" \ | ||
-F "variables[GITHUB_REF]=${GITHUB_REF##*/}" \ | ||
${GITLAB_CI_TRIGGER_URL} |