File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,14 +74,15 @@ jobs:
7474 git diff --name-only -z "$BASE_SHA" HEAD -- '*.go' | while IFS= read -r -d '' file; do
7575 if [ ! -f "$file" ]; then continue; fi
7676
77- TEMP_OLD="old_temp.go"
77+ # Use /tmp to avoid Go package conflicts with workspace files
78+ TEMP_OLD="/tmp/old_temp.go"
7879 git show "$BASE_SHA:$file" > "$TEMP_OLD" 2>/dev/null || touch "$TEMP_OLD"
7980
8081 if ! OUTPUT=$(sfw diff "$TEMP_OLD" "$file" 2>&1); then
8182 echo "::error::sfw failed on $file: $OUTPUT"
82- rm "$TEMP_OLD"; continue
83+ rm -f "$TEMP_OLD"; continue
8384 fi
84- rm "$TEMP_OLD"
85+ rm -f "$TEMP_OLD"
8586
8687 # Validate JSON
8788 if ! echo "$OUTPUT" | jq -e . >/dev/null 2>&1; then
@@ -118,4 +119,4 @@ jobs:
118119 echo " **CI FAILED**: Logic changed in 'semantic-safe' PR." >> $GITHUB_STEP_SUMMARY
119120 exit 1
120121 fi
121- exit 0
122+ exit 0
You can’t perform that action at this time.
0 commit comments