forked from ipdxco/unified-github-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreusable-semantic-pull-request.yml
More file actions
41 lines (38 loc) · 1 KB
/
reusable-semantic-pull-request.yml
File metadata and controls
41 lines (38 loc) · 1 KB
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
37
38
39
40
41
name: Semantic PR
on:
workflow_call:
inputs:
runner:
required: false
type: string
default: '"ubuntu-latest"'
jobs:
main:
name: Validate PR title
runs-on: ${{ fromJSON(vars['UCI_SEMANTIC_PULL_REQUEST_RUNNER'] || inputs['runner']) }}
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Configure which types are allowed (newline delimited).
types: |
feat
fix
chore
docs
deps
test
refactor
ci
requireScope: false
- name: Check PR title length
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
title_length=${#TITLE}
if [ $title_length -gt 72 ]
then
echo "PR title is too long (greater than 72 characters)"
exit 1
fi