The final step is challenging; likely the most difficult part is changing all the code references and imports. Shadowing changes would be straightforward. Training your likely 25-50 engineers to use the new code review UX would likely not take that long.
Considering the wasted engineering velocity during Github outages, it's worthwhile to do even a partial migration. Github's action runners have in my experience, been the most fragile part of the platform. Given the ease of moving build and merge queue runners to alternates, it's a no-brainer.
Of course you may not want to manage the hardware yourself in which case you'd go for a dedicated server from a reputable provider (i.e. not microsoft/google) like OVH's RISE-XL, Hetzner's EX131, Scaleway's Core-9-L (or an equivalent solution from a smaller provider) for about 4000€/year.
Now let's say you add 8k€/year donations to your distro of choice, forge of choice, and other FLOSS projects and 8k€/year for backups. You got the whole thing running sustainably with >99.9% uptime for 20k€/year or 20% of the original bill.