I have done a lot of looking into this under NZ codes as I used to work with a cold-formed shed supplier and have designed or assessed a few hot-rolled portals in my time.
For us, cold-formed and hot-rolled steel end up having very similar provisions, with the less-developed cold-formed code mostly just pointing us at the effective length provisions of the main steel code
You need to check your own codes first though because obviously things may be different for you, particularly as your portal appears to be cold-rolled
Anyway, I recommend giving this paper a whirl first - it's pretty short and covers off a lot of topics relating to hot-rolled portal frames
This document is a 100% must-read in my opinion, I always recommend it when someone I work with asks about portals
In NZ our effective lengths for bending calculations are based off segments with ends that are "Unrestrained", "Lateral restraint to critical flange only", "Partially restrained cross-section" or "Fully-restrained cross-section"
The code gives a bunch of fancy pictures illustrating various ways to achieve these different conditions
Long story short though, welding a cleat to the top flange of a portal and fixing it to a purlin with 2 bolts is considered to provide both lateral restraint to the attached flange, and partial rotational restraint to the cross-section
So, in NZ, this would give you "Partial" cross-sectional restraint if the compression flange is the bottom flange, or "Full" cross-sectional restraint if the compression flange is the top flange
I am not aware of any guides to check the strength or stiffness of the "assembly" though
I would only ever think about this in the context of assessing the restraint provided to my portal - I would not be trying to create some sort of funky composite structure out of everything