Github Hosted Runners and Their Access to GCP VPC


TL; DR: Given plenty of free time of Github hosted runners, I’m tempted to use it instead of running self-hosted ones in my GCP environment. Here are some options to grant network access to my GCP VPC.

Prerequisites: Google Workload Identity Federation for Github Runners

Option , grab the public IP of the runner on-the-fly and grant/revoke access using Google’s firewall rules.

YAML

Option , use Google IAP(Identity Aware Proxy) tunnel, which I think it’s better

YAML

🙂