ci: add commitlint to ci checks for merge requests
This commit is contained in:
parent
cf92096102
commit
a45269d993
1 changed files with 18 additions and 1 deletions
|
@ -3,7 +3,13 @@
|
|||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
image: node:lts
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
||||
variables:
|
||||
PACKAGE_NAME: ds4
|
||||
|
@ -17,6 +23,8 @@ stages:
|
|||
- release
|
||||
- publish
|
||||
|
||||
image: node:lts
|
||||
|
||||
cache: &global_cache
|
||||
paths:
|
||||
- .yarn/cache
|
||||
|
@ -61,6 +69,15 @@ reuse:
|
|||
script:
|
||||
- reuse lint
|
||||
|
||||
commitlint:
|
||||
stage: check
|
||||
before_script:
|
||||
- yarn install --immutable
|
||||
script:
|
||||
- yarn run commitlint --from $CI_MERGE_REQUEST_DIFF_BASE_SHA
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_DIFF_BASE_SHA"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
before_script:
|
||||
|
|
Loading…
Reference in a new issue