-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
36 lines (33 loc) · 974 Bytes
/
.gitlab-ci.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
stages:
- build_and_pr
variables:
LIBLAB_CI: "true"
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
- if: $CI_PIPELINE_SOURCE == "web"
- changes:
- liblab.config.json
- spec.*
- hooks/**
- customPlanModifiers/**
generate_sdks_and_pull_request:
stage: build_and_pr
image: node:20
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
- if: $CI_PIPELINE_SOURCE == "web"
- changes:
- liblab.config.json
- spec.*
- hooks/**
- customPlanModifiers/**
before_script:
- |
if [ -z "$LIBLAB_TOKEN" ] || [ -z "$LIBLAB_GITLAB_TOKEN" ]; then
echo "Error: Variables LIBLAB_TOKEN and LIBLAB_GITLAB_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-gitlab-actions/#create-tokens"
exit 1
fi
- npm install -g liblab
script:
- liblab build --yes --pr -p gitlab