-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.15 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@990e5cc2aa4058b4012f989c9c9e689734e52c54 # v1
check-conventional-commit:
name: Check commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: "${{ github.event.pull_request.head.ref }}"
repository: "${{ github.event.pull_request.head.repo.full_name }}"
fetch-depth: 0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
cache: "pip" # caching pip dependencies
- run: pip install commitizen
- name: Check commit messages
run: cz check --rev-range origin/${GITHUB_BASE_REF}..