Update CI workflow to include maintenance branch (#2999) (cherry picked from commit 26f3e6081bae1873e3a1a6aa67d9e7a5dfe5c581)