File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,18 @@ jobs:
2727 echo "skip=false" >> $GITHUB_OUTPUT
2828 fi
2929
30- - name : Check for changes in src
30+ - name : Check for changes
3131 id : check_changes
3232 run : |
33- git fetch --no-tags --prune --depth=1 origin +refs/heads/main:refs/remotes/origin/main
34- CHANGES=$(git diff --name-only HEAD^ HEAD -- 'src/')
33+ git fetch origin ${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
34+ git fetch origin ${{ github.head_ref }}:refs/remotes/origin/${{ github.head_ref }}
35+ CHANGES=$(git diff --name-only refs/remotes/origin/${{ github.base_ref }}...refs/remotes/origin/${{ github.head_ref }} -- 'src/')
3536 if [ -n "$CHANGES" ]; then
3637 echo "Changes detected in src/ directory"
37- echo "publish =true" >> $GITHUB_OUTPUT
38+ echo "has_changes =true" >> $GITHUB_ENV
3839 else
3940 echo "No changes detected in src/ directory"
40- echo "publish =false" >> $GITHUB_OUTPUT
41+ echo "has_changes =false" >> $GITHUB_ENV
4142 fi
4243
4344 build-test-publish :
You can’t perform that action at this time.
0 commit comments