diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml new file mode 100644 index 000000000..0ced5ea0c --- /dev/null +++ b/.github/workflows/check_pr.yml @@ -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 were found in this pull request." + fi \ No newline at end of file diff --git a/.github/workflows/check_push.yml b/.github/workflows/check_push.yml deleted file mode 100644 index 588ef486c..000000000 --- a/.github/workflows/check_push.yml +++ /dev/null @@ -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