Update changelog-pr.yml / Add Check

This commit is contained in:
CanbiZ 2024-11-17 16:43:23 +01:00 committed by GitHub
parent a4696475d5
commit aab8be4544
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,6 @@ name: Create Changelog Pull Request
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
@ -38,6 +37,19 @@ jobs:
echo "LATEST_DATE=$LATEST_DATE" >> $GITHUB_ENV
fi
- name: Check if CHANGELOG.md was modified
id: changelog-check
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
echo "Changed files: $CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -q 'CHANGELOG.md'; then
echo "Changes detected in CHANGELOG.md, skipping additional checks."
echo "changelog_modified=true" >> $GITHUB_ENV
else
echo "No changes to CHANGELOG.md, continuing with protection checks."
echo "changelog_modified=false" >> $GITHUB_ENV
fi
- name: Get categorized pull requests
id: get-categorized-prs
uses: actions/github-script@v7