1
0
Fork 0
mirror of synced 2024-11-14 06:08:59 -05:00
garuda-common-settings/.gitlab-ci.yml

18 lines
565 B
YAML
Raw Normal View History

---
stages: [check-pr]
check-pr:
# Check the current commit message for compliance with commitizen
stage: check-pr
image: alpine:latest
inherit:
variables: false
script:
- apk add --no-cache --upgrade py3-pip
- pip install -U commitizen
- cz check --message "$CI_COMMIT_MESSAGE" >/tmp/cz_check || true # why does it return 1 if its actually 0?
- grep "successful" /tmp/cz_check # ugly hack to workaround the above issue
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'