Is it possible to link a public github repo (one I don't own) in Cloud Build?

I'm trying to use terraform to help provision services, but one thing I'm running into (even doing it manually via the console) is linking a github repository that I don't own (but is public) in the Cloud Build Repositories section.  Is this possible?  Or do I need to fork the github repo?  If I do need to fork the github repo, is there any automatic way to keep the forked repo (that I now own) synced with its original?  Thanks!

0 1 157
1 REPLY 1

Hi @jgreenberg,

Welcome to Google Cloud Community!

TL;DR for linking a public GitHub repo you don't own to Cloud Build:

Option 1: Fork the repo:

  • Clone it to your account, giving you full control.
  • Link your fork to Cloud Build.
  • Manually or automatically sync with the original repo.

Option 2: Use Cloud Build triggers:

  • Create a trigger with the public repo URL.
  • Configure it to run on pushes to specific branches/tags.
  • No forking needed, but less control and security.

Choose based on your need for control, security, and maintenance.