Webapp • Infrastructure • Firebase Functions
A number of Firebase Gen 1 and Gen 2 Cloud Functions.
removeRelatedOnTripDelete
- Triggered by trip delete. Deletes subcollections and, if uploaded, the Firebase Storage image (stored on the trip astrip.image
)
Set the .firebaserc
file to use your firebase's project name. You need to enable the Cloud Build API and the Artifact Registry API to deploy from GitHub Actions.
To deploy functions when pushing to main branch, you'll need to set up the service account and workload identity federation as denoted in the terraform configuration.
After you've set that up, set up these action secrets on your repo:
WORKLOAD_IDENTITY_PROVIDER
: The workload identity provider's "default audience", minus the iam.googleapis.com bit:
SERVICE_ACCOUNT
: The email address service account you set up, e.g.[email protected]
Finally, add the following roles to the IAM prinicpal ending in "@cloudbuild.gserviceaccount.com":
- Firebase Admin
- API Keys Admin