Skip to content

Commit d0c33f1

Browse files
authored
Merge branch 'main' into customDaoFix
2 parents 7ad0d0c + 5805497 commit d0c33f1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/buildAndPublish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: "Checkout"
2020
uses: actions/checkout@v4
2121
with:
22-
fetch-depth: 2
22+
fetch-depth: 0
2323

2424
- name: "Check for changes in src folder"
2525
id: checkChanges
@@ -37,7 +37,12 @@ jobs:
3737
3838
echo "${yellow}Checking if there has been changes to source code by running git diff on the src folder excluding markdown files${reset}"
3939
40-
changes=$(git diff "${{ github.ref_name }}^" "${{ github.ref_name }}" --ignore-all-space --name-only -- src/)
40+
if [ ${{ github.event_name == 'pull_request' }} ]; then
41+
changes=$(git diff ${{ github.event.pull_request.base.ref }}..${{ github.sha }} --ignore-all-space --name-only -- src/)
42+
else
43+
changes=$(git diff "${{ github.ref_name }}^" "${{ github.ref_name }}" --ignore-all-space --name-only -- src/)
44+
fi
45+
4146
nonMarkdownChanges=""
4247
continueWorkflow=true
4348

0 commit comments

Comments
 (0)