-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.03 KB
/
pr.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
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-FileCopyrightText: 2023 Siemens AG
#
# SPDX-License-Identifier: Apache-2.0
#
# Author: Michael Adler <[email protected]>
---
name: PR checks
on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
# needed to comment on the PR
pull-requests: write
jobs:
check-sign-off:
name: Write comment if commits are not signed-off
env:
FORCE_COLOR: 1
runs-on: ubuntu-latest
steps:
- uses: live627/check-pr-signoff-action@v1
check-conventional-commit:
name: Check commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.head.ref }}"
repository: "${{ github.event.pull_request.head.repo.full_name }}"
fetch-depth: 0
- uses: actions/setup-python@v4
with:
cache: "pip" # caching pip dependencies
- run: pip install commitizen
- name: Check commit messages
run: cz check --rev-range origin/${GITHUB_BASE_REF}..