-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (36 loc) · 1.18 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: "Gitlab Trigger Action"
description: "Triggers Gitlab pipeline with envs"
inputs:
token:
description: "Gitlab token"
required: true
projectId:
description: "Project ID where your Gitlab CI Pipeline awaits"
required: true
endpoint:
description: "Gitlab endpoint (defaults to Official Gitlab Endpoint)"
default: "https://gitlab.com"
required: false
ref:
description: "Git branch of target pipeline"
default: "master"
required: false
envs:
description: "Environment variables separated with , without spaces (e.g. VERSION=1.1.2,ARCH=amd64)"
required: false
runs:
using: composite
steps:
- name: Download gl cli util
shell: bash
run: |
echo "Downloading and installing dependencies"
curl https://dl.qameta.io/artifactory/bin/gitlab/gl -o gl && \
chmod +x gl && \
mv gl /usr/local/bin
- name: Authorizing in Gitlab
shell: bash
run: gl auth login --token=${{ inputs.token }} --project-id=${{ inputs.projectId }} --endpoint=${{ inputs.endpoint }}
- name: Triggering Gitlab Pipeline
shell: bash
run: gl pipeline run --ref=${{ inputs.ref }} --env=${{ inputs.envs }}