-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
30 lines (28 loc) · 1.01 KB
/
bitbucket-pipelines.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
definitions:
steps:
- step: &generate_sdks_and_pull_request
name: Generate SDKs and Pull Request
image: node:20
caches:
- node
script:
- |
# Check for changes in the specified files or directories
if git diff --quiet HEAD~1 -- liblab.config.json spec/ hooks/ customPlanModifiers/; then
echo "No changes detected in relevant files. Skipping step."
exit 0
fi
- |
if [ -z "$LIBLAB_TOKEN" ] || [ -z "$LIBLAB_BITBUCKET_TOKEN" ]; then
echo "Error: Variables LIBLAB_TOKEN and LIBLAB_BITBUCKET_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-BITBUCKET-actions/#create-tokens"
exit 1
fi
- npm install -g liblab
- liblab build --yes --pr -p bitbucket
pipelines:
branches:
main:
- step: *generate_sdks_and_pull_request
pull-requests:
'**':
- step: *generate_sdks_and_pull_request