Reusable GitHub Actions workflows for deploying services across LoopKitchen repos.
Builds and deploys a service to Cloud Run via Cloud Build.
In your repo, create .github/workflows/deploy.yml:
name: Deploy to Cloud Run
on:
workflow_dispatch:
push:
branches: [main]
jobs:
deploy:
uses: LoopKitchen/shared-workflows/.github/workflows/deploy-cloud-run.yml@main
with:
service_name: my-service # required
# project_id: arboreal-vision-339901 # optional, this is the default
# region: us-central1 # optional, this is the default
# cloudbuild_config: cloudbuild.yaml # optional, this is the default
secrets:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}| Input | Required | Default | Description |
|---|---|---|---|
service_name |
Yes | — | Cloud Run service name |
project_id |
No | arboreal-vision-339901 |
GCP project ID |
region |
No | us-central1 |
GCP region |
cloudbuild_config |
No | cloudbuild.yaml |
Path to Cloud Build config |
| Secret | Required | Description |
|---|---|---|
GCP_SA_KEY |
Yes | GCP service account JSON key with Cloud Build, Cloud Run, and Artifact Registry permissions |
- Add
GCP_SA_KEYas a repository secret in your repo (Settings → Secrets → Actions) - Create a
.github/workflows/deploy.ymlfile using the template above - Push to
mainor click "Run workflow" in the Actions tab