Skip to content

Commit ed2d5e7

Browse files
committed
Håndtere Pull Request bedre
1 parent 3007a1f commit ed2d5e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/buildAndPublish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
if [ ${{ github.event_name == 'pull_request' }} ]; then
4040
changes=$(git diff "${{ github.event.pull_request.base.sha }}".."${{ github.event.pull_request.head.sha }}" --ignore-all-space --name-only -- src/)
4141
else
42-
changes=$(git diff "${{ github.ref_name }}^" "${{ github.ref_name }}" --ignore-all-space --name-only -- src/)
42+
# Fetch the parent commit SHA dynamically, ensuring we're always looking at the immediate predecessor.
43+
changes=$(git diff $(git rev-parse "${{ github.ref_name }}^") "${{ github.ref_name }}" --ignore-all-space --name-only -- src/)
4344
fi
4445
4546
nonMarkdownChanges=""

0 commit comments

Comments
 (0)