Skip to content

Commit a637a8c

Browse files
authored
Merge pull request #49 from cesaregarza/feature/update_main
another try
2 parents 86fd71d + 1368533 commit a637a8c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/main.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)