Skip to content

Initalize changelog test workflow #8

Initalize changelog test workflow

Initalize changelog test workflow #8

Workflow file for this run

name: Changelog Check
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
changelog-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check for CHANGELOG.md update
id: changelog-check
run: |
if ! grep -q "CHANGELOG.md" <<< "${{ github.event.pull_request.changed_files }}"; then
echo "Each PR must include an update to the CHANGELOG.md file."
echo "::set-output name=comment::Each PR must include an update to the CHANGELOG.md file."
echo "::set-output name=changelog-updated::false"
else
echo "CHANGELOG.md update found."
echo "::set-output name=changelog-updated::true"
fi
- name: Prevent PR merge if CHANGELOG.md is not updated
if: steps.changelog-check.outputs.changelog-updated == 'false'
run: |
echo "The CHANGELOG.md file must be updated before merging."
exit 1