mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-05 21:21:49 +02:00
CI: check that the changelog is populated on each pull request
This commit is contained in:
parent
c89988654c
commit
ddedc3c9d2
2 changed files with 35 additions and 19 deletions
35
.github/workflows/check_pr.yml
vendored
Normal file
35
.github/workflows/check_pr.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
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
|
||||||
|
env:
|
||||||
|
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if git diff --exit-code "origin/${BASE_REF}" -- CHANGELOG.md; then
|
||||||
|
echo "::warning::No CHANGELOG.md modifications found in this pull request. You can override this check by adding the 'no changelog' label to the pull request."
|
||||||
|
fi
|
19
.github/workflows/check_push.yml
vendored
19
.github/workflows/check_push.yml
vendored
|
@ -1,19 +0,0 @@
|
||||||
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
|
|
Loading…
Reference in a new issue