Updates the build-images workflow to improve reliability and reduce dependency on external tools like `jq`.
- Replaced `jq` with `python3` for generating the JSON matrix, removing the need to install a separate binary and allowing for more standard standard library usage.
- Switched from a shell glob loop (`for DIR in images/*`) to `find` for more robust directory discovery when detecting manual triggers.
- Added explanatory comments regarding fallback behavior for push events.
- Added debug logging for the generated JSON output.