From aab8be4544f02297e19a4362fb2bffc0ce7a542e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:43:23 +0100 Subject: [PATCH] Update changelog-pr.yml / Add Check --- .github/workflows/changelog-pr.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 09a7a310..3c50a873 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -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