Update README.md #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify CHANGELOG Updated | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
check-changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Check if CHANGELOG.md is updated | |
run: | | |
# Get the list of files changed in the pull request | |
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD) | |
# Check if CHANGELOG.md is in the list of changed files | |
if echo "$CHANGED_FILES" | grep -q 'CHANGELOG.md'; then | |
echo "CHANGELOG.md updated." | |
else | |
echo "ERROR: Please update the CHANGELOG.md file with your changes." && exit 1 | |
fi |