diff --git a/.github/workflows/send-api-key.yml b/.github/workflows/send-api-key.yml index cee7e3bf3843..f9e657737cd5 100644 --- a/.github/workflows/send-api-key.yml +++ b/.github/workflows/send-api-key.yml @@ -24,8 +24,15 @@ jobs: set -e echo "🔍 Checking if recipe files were added or modified in merged PR..." - # Get the list of files that were added or modified in the merged PR (not deleted) - CHANGED_FILES=$(git diff --name-only --diff-filter=AM ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}) + # Get the current commit (merge commit) and the previous commit on the base branch + CURRENT_COMMIT=$(git rev-parse HEAD) + PREVIOUS_COMMIT=$(git rev-parse HEAD~1) + + echo "Current commit: $CURRENT_COMMIT" + echo "Previous commit: $PREVIOUS_COMMIT" + + # Get the list of files that were added or modified in this merge (not deleted) + CHANGED_FILES=$(git diff --name-only --diff-filter=AM $PREVIOUS_COMMIT..$CURRENT_COMMIT) echo "Files added/modified in merged PR:" echo "$CHANGED_FILES"