From c5ef71a4383e02f9fcd99bf0a47e3e4e9425fe90 Mon Sep 17 00:00:00 2001 From: Mathias Elle Date: Tue, 20 Aug 2024 00:17:25 +0200 Subject: [PATCH] Change to Branch/Main to BASE_BRANCH --- .github/workflows/check-changelog.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml index 82d4b63..93423f5 100644 --- a/.github/workflows/check-changelog.yml +++ b/.github/workflows/check-changelog.yml @@ -9,7 +9,8 @@ jobs: - name: Check for changelog entry run: | - if ! git diff --name-only origin/main | grep -q 'CHANGELOG.md'; then - echo "No changelog entry found. Please add an entry to CHANGELOG.md." - exit 1 - fi + BASE_BRANCH=$(jq -r .base.ref < $GITHUB_EVENT_PATH) + if ! git diff --name-only $BASE_BRANCH | grep -q 'CHANGELOG.md'; then + echo "No changelog entry found. Please add an entry to CHANGELOG.md." + exit 1 + fi