Skip to content

Commit 8fb06ad

Browse files
committed
chore: refine Docker workflow for plugin dependency management
- Cleared module cache to prevent conflicts during dependency updates. - Removed problematic requirements and replaced them with compatible versions for improved stability. - Added debugging output to display the updated go.mod file for better visibility during builds.
1 parent d62f6b6 commit 8fb06ad

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/docker-deploy.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,27 @@ jobs:
8989
echo "Updating dependencies for $plugin_dir"
9090
cd "$plugin_dir"
9191
92-
# Update to compatible versions from main module
93-
go get github.com/glauth/ldap@v0.0.0-20240419171521-1f14f5c1b4ad
92+
# Clear the module cache to avoid conflicts
93+
go clean -modcache || true
9494
95-
# Add replace directive to use local main module
95+
# Remove all problematic requirements and replace with compatible versions
96+
go mod edit -droprequire github.com/glauth/ldap || true
97+
go mod edit -droprequire github.com/glauth/glauth/v2 || true
98+
go mod edit -droprequire github.com/nnstd/glauth/v2 || true
99+
100+
# Add replace directives to use local main module
96101
go mod edit -replace github.com/nnstd/glauth/v2=../../..
97102
go mod edit -replace github.com/glauth/glauth/v2=../../..
103+
go mod edit -replace github.com/glauth/ldap@v0.0.0-20210720162743-7f8d1e44eeba=github.com/glauth/ldap@v0.0.0-20240419171521-1f14f5c1b4ad
104+
105+
# Update to compatible versions from main module
106+
go get github.com/glauth/ldap@v0.0.0-20240419171521-1f14f5c1b4ad
98107
go mod tidy
99108
109+
# Show the updated go.mod for debugging
110+
echo "Updated go.mod for $plugin_dir:"
111+
cat go.mod
112+
100113
cd ../../..
101114
fi
102115
done

0 commit comments

Comments
 (0)