Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Create workflow yml for github actions (#61)
Browse files Browse the repository at this point in the history
* 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
sujen1412 authored Jun 25, 2020
1 parent c9cb441 commit 9372e1f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/gitlab-trigger.yml
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}

0 comments on commit 9372e1f

Please sign in to comment.