Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.64 KB

File metadata and controls

54 lines (39 loc) · 1.64 KB

LoopKitchen Shared Workflows

Reusable GitHub Actions workflows for deploying services across LoopKitchen repos.

Available Workflows

deploy-cloud-run.yml

Builds and deploys a service to Cloud Run via Cloud Build.

Usage

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 }}

Inputs

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

Secrets

Secret Required Description
GCP_SA_KEY Yes GCP service account JSON key with Cloud Build, Cloud Run, and Artifact Registry permissions

Setup

  1. Add GCP_SA_KEY as a repository secret in your repo (Settings → Secrets → Actions)
  2. Create a .github/workflows/deploy.yml file using the template above
  3. Push to main or click "Run workflow" in the Actions tab