# google-github-actions/example-workflows architecture

> Architecture diagram of the GitHub repository google-github-actions/example-workflows, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/google-github-actions/example-workflows
- Repository: https://github.com/google-github-actions/example-workflows

## Overview

This repository is a catalog of Google GitHub Actions example workflows, not a deployment engine. Its main user journey is to select a workflow example and adapt it to build or source-deploy an application, publish an image when applicable, and deploy to Cloud Run or GKE. The README documents the workflow capabilities; workflow YAML contents were not sampled, so links show only those documented actions and not their internal action-by-action wiring.

Main entry points: [`workflows/deploy-cloudrun/cloudrun-buildpacks.yml`](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-buildpacks.yml) (Buildpacks Workflow), [`workflows/deploy-cloudrun/cloudrun-declarative.yml`](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-declarative.yml) (Declarative Workflow), [`workflows/deploy-cloudrun/cloudrun-docker.yml`](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-docker.yml) (Docker Workflow), [`workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml`](https://github.com/google-github-actions/example-workflows/blob/main/workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml) (Cloud Deploy Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cloudrun["Cloud Run Examples"]
  node_buildpacks["Buildpacks Workflow"]
  node_declarative["Declarative Workflow"]
  node_docker["Docker Workflow"]
  node_source["Source Workflow"]
end

subgraph group_deploy["Cloud Deploy Example"]
  node_clouddeploy["Cloud Deploy Workflow"]
end

subgraph group_gke["GKE Example"]
  node_gkeworkflow["GKE Workflow"]
end

subgraph group_stages["Build And Publish"]
  node_containerbuild["Container Build"]
  node_sourcebuild["Source Deployment"]
end

node_developer(("Workflow User"))
node_artifactregistry[("Artifact Registry")]
node_containerregistry[("Container Registry")]
node_cloudrunservice["Cloud Run"]
node_clouddeployservice["Cloud Deploy"]
node_gkeservice["GKE"]

node_developer -->|"selects"| node_buildpacks
node_developer -->|"selects"| node_declarative
node_developer -->|"selects"| node_docker
node_developer -->|"selects"| node_source
node_developer -->|"selects"| node_clouddeploy
node_developer -->|"selects"| node_gkeworkflow
node_buildpacks -->|"builds image"| node_containerbuild
node_buildpacks -->|"publishes image"| node_artifactregistry
node_buildpacks -->|"deploys to"| node_cloudrunservice
node_declarative -->|"builds image"| node_containerbuild
node_declarative -->|"publishes image"| node_artifactregistry
node_declarative -->|"deploys to"| node_cloudrunservice
node_docker -->|"builds image"| node_containerbuild
node_docker -->|"publishes image"| node_artifactregistry
node_docker -->|"deploys to"| node_cloudrunservice
node_source -->|"deploys from source"| node_sourcebuild
node_source -->|"deploys to"| node_cloudrunservice
node_clouddeploy -->|"builds image"| node_containerbuild
node_clouddeploy -->|"publishes image"| node_artifactregistry
node_clouddeploy -->|"uses"| node_clouddeployservice
node_clouddeployservice -->|"deploys to"| node_cloudrunservice
node_gkeworkflow -->|"builds image"| node_containerbuild
node_gkeworkflow -->|"publishes image"| node_containerregistry
node_gkeworkflow -->|"deploys to"| node_gkeservice

click node_buildpacks "https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-buildpacks.yml"
click node_declarative "https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-declarative.yml"
click node_docker "https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-docker.yml"
click node_source "https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-source.yml"
click node_clouddeploy "https://github.com/google-github-actions/example-workflows/blob/main/workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml"
click node_gkeworkflow "https://github.com/google-github-actions/example-workflows/blob/main/workflows/get-gke-credentials/gke-build-deploy.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_buildpacks,node_declarative,node_docker,node_source,node_developer toneBlue
class node_clouddeploy,node_artifactregistry,node_containerregistry toneAmber
class node_gkeworkflow toneMint
class node_containerbuild,node_sourcebuild toneRose
class node_cloudrunservice,node_clouddeployservice,node_gkeservice toneIndigo
```

## Components

### Cloud Run Examples

- [Buildpacks Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-buildpacks.yml): `workflows/deploy-cloudrun/cloudrun-buildpacks.yml`
- [Declarative Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-declarative.yml): `workflows/deploy-cloudrun/cloudrun-declarative.yml`
- [Docker Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-docker.yml): `workflows/deploy-cloudrun/cloudrun-docker.yml`
- [Source Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/deploy-cloudrun/cloudrun-source.yml): `workflows/deploy-cloudrun/cloudrun-source.yml`

### Cloud Deploy Example

- [Cloud Deploy Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml): `workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml`

### GKE Example

- [GKE Workflow](https://github.com/google-github-actions/example-workflows/blob/main/workflows/get-gke-credentials/gke-build-deploy.yml): `workflows/get-gke-credentials/gke-build-deploy.yml`

### Build And Publish

- **Container Build**
- **Source Deployment**

### Other components

- **Workflow User**
- **Artifact Registry**
- **Container Registry**
- **Cloud Run**
- **Cloud Deploy**
- **GKE**

## Connections

- Workflow User → Buildpacks Workflow: selects (evidence: `README.md`)
- Workflow User → Declarative Workflow: selects (evidence: `README.md`)
- Workflow User → Docker Workflow: selects (evidence: `README.md`)
- Workflow User → Source Workflow: selects (evidence: `README.md`)
- Workflow User → Cloud Deploy Workflow: selects (evidence: `README.md`)
- Workflow User → GKE Workflow: selects (evidence: `README.md`)
- Buildpacks Workflow → Container Build: builds image (evidence: `README.md`)
- Buildpacks Workflow → Artifact Registry: publishes image (evidence: `README.md`)
- Buildpacks Workflow → Cloud Run: deploys to (evidence: `README.md`)
- Declarative Workflow → Container Build: builds image (evidence: `README.md`)
- Declarative Workflow → Artifact Registry: publishes image (evidence: `README.md`)
- Declarative Workflow → Cloud Run: deploys to (evidence: `README.md`)
- Docker Workflow → Container Build: builds image (evidence: `README.md`)
- Docker Workflow → Artifact Registry: publishes image (evidence: `README.md`)
- Docker Workflow → Cloud Run: deploys to (evidence: `README.md`)
- Source Workflow → Source Deployment: deploys from source (evidence: `README.md`)
- Source Workflow → Cloud Run: deploys to (evidence: `README.md`)
- Cloud Deploy Workflow → Container Build: builds image (evidence: `README.md`)
- Cloud Deploy Workflow → Artifact Registry: publishes image (evidence: `README.md`)
- Cloud Deploy Workflow → Cloud Deploy: uses (evidence: `README.md`)
- Cloud Deploy → Cloud Run: deploys to (evidence: `README.md`)
- GKE Workflow → Container Build: builds image (evidence: `README.md`)
- GKE Workflow → Container Registry: publishes image (evidence: `README.md`)
- GKE Workflow → GKE: deploys to (evidence: `README.md`)
