This commit is a continuation of eacfd77d but for workflows specific to the main branch.
eacfd77d
Closes gh-32443