-
Notifications
You must be signed in to change notification settings - Fork 178
34 lines (32 loc) · 991 Bytes
/
check_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
name: Check branch conformity
on:
pull_request:
jobs:
prevent-fixup-commits:
runs-on: ubuntu-latest
env:
target: debian-bookworm
distro: debian
version: bookworm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: prevent fixup commits
run: |
git fetch origin
git status
git log --pretty=format:%s origin/main..HEAD | grep -ie '^fixup\|^wip' && exit 1 || true
check-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ensure CHANGELOG.md is populated
run: |
CHANGELOG_MODIFIED=$(git diff --name-only ${GITHUB_SHA} | grep -c "CHANGELOG.md")
if [ $CHANGELOG_MODIFIED -eq 0 ]; then
echo "::error::No CHANGELOG modifications found in this pull request. Please update the CHANGELOG."
exit 1
fi