File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 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
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
You can’t perform that action at this time.
0 commit comments