ci: fix browser extension nightly running the wrong steps
Created by: jhchabran
Fixes #26409 (closed)
Because the check for the main branch was before the browser ext nightly, he never reached that case in the switch statement, which led to running backend tests on a pipeline that doesn't have the necessary credentials and thus breaking it on every build.