ci: Rename commitlint to PR title Lint, echo PR titles from env var

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
This commit is contained in:
Sergei Petrosian 2023-06-21 09:24:04 +02:00 committed by Sergei Petrosian
parent f07e275282
commit e791fb9440

View file

@ -1,4 +1,4 @@
name: Commitlint
name: PR Title Lint
on: # yamllint disable-line rule:truthy
pull_request:
types:
@ -25,6 +25,7 @@ jobs:
run: npm install @commitlint/config-conventional @commitlint/cli
- name: Run commitlint on PR title
run: >-
echo '${{ github.event.pull_request.title }}' |
npx commitlint --verbose
env:
PR_TITLE: ${{ github.event.pull_request.title }}
# Echo from env variable to avoid bash errors with extra characters
run: echo "$PR_TITLE" | npx commitlint --verbose