File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,20 @@ jobs:
178
178
- name : Check for differences
179
179
id : check-diff
180
180
run : |
181
+ set -e
182
+ BASE_BRANCH="${{ needs.create-branch-prefix.outputs.base-branch }}"
183
+ echo "Checking for differences between main and $BASE_BRANCH"
184
+
185
+ # Fetch both branches
181
186
git fetch origin main
182
- if git diff --quiet origin/main ${{ needs.create-branch-prefix.outputs.base-branch }}; then
187
+ git fetch origin "$BASE_BRANCH"
188
+
189
+ # Compare the branches using proper remote refs
190
+ if git diff --quiet origin/main "origin/$BASE_BRANCH"; then
183
191
echo "No differences found between branches"
184
192
echo "has_changes=false" >> $GITHUB_OUTPUT
185
193
else
186
- echo "Changes detected"
194
+ echo "Changes detected between branches "
187
195
echo "has_changes=true" >> $GITHUB_OUTPUT
188
196
fi
189
197
You can’t perform that action at this time.
0 commit comments