Re-org discard builds condition and Add Reg exp condition

Flatten all conditions to discard builds

Signed-off-by: Joey Jiao <joey.jiaojg@gmail.com>