Skip to content

ci: check that the changelog is populated on each pull request #4

ci: check that the changelog is populated on each pull request

ci: check that the changelog is populated on each pull request #4

Workflow file for this run

name: Check branch conformity
on:
pull_request:
types: [opened, synchronize, reopened]
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: |

Check failure on line 30 in .github/workflows/check_pr.yml

View workflow run for this annotation

GitHub Actions / Check branch conformity

Invalid workflow file

The workflow is not valid. .github/workflows/check_pr.yml (Line: 30, Col: 14): Unexpected symbol: '$GITHUB_SHA'. Located at position 1 within expression: $GITHUB_SHA
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