Skip to content

Commit 37da85e

Browse files
committed
See if introducing HEAD in workflow helps with weird comparison to main branch
1 parent 241a59a commit 37da85e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/check-sync-module-dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
- name: Check for go.mod changes
3232
run: |
3333
# List changed go.mod files (added/modified/deleted)
34-
CHANGED=$(git diff --name-only --ignore-all-space | grep -E '(^|/)go\.mod$' || true)
34+
CHANGED=$(git diff --name-only --ignore-all-space HEAD | grep -E '(^|/)go\.mod$' || true)
3535
3636
if [ -n "$CHANGED" ]; then
3737
echo "::error::go.mod files are out of sync with generate-module-dependencies."
3838
echo "The following go.mod files changed:"
3939
echo "$CHANGED"
4040
echo
4141
echo "Diff:"
42-
git --no-pager diff -- $CHANGED || true
42+
git --no-pager diff HEAD -- $CHANGED || true
4343
echo
4444
echo "To fix locally:"
4545
echo " Ensure that you update the dependency-replacements.yaml file and run make generate-module-dependencies"

0 commit comments

Comments
 (0)