# bretfisher/github-actions-templates architecture

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

- Interactive diagram: https://gitdiagram.com/bretfisher/github-actions-templates
- Repository: https://github.com/bretfisher/github-actions-templates

## Overview

This repository provides GitHub Actions workflow templates rather than a standalone application. The main workflow is that a repository maintainer copies a calling template into a project, where it invokes a reusable workflow for linting, image building, or scanning. The advanced promotion template also invokes a build workflow and uses the GitOps reusable workflow to open a deployment PR. Relationships below are based on the README; workflow source excerpts were not available, so internal call details are limited to what it documents.

Main entry points: [`templates/call-docker-build-promotion.yaml`](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build-promotion.yaml) (Build promotion template), [`templates/call-docker-build.yaml`](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build.yaml) (Docker build template), [`templates/call-grype-scan-image.yaml`](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-grype-scan-image.yaml) (Grype scan template), [`templates/call-super-linter.yaml`](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-super-linter.yaml) (Super-Linter template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_templates["Calling templates"]
  node_docker_template["Docker build template"]
  node_promotion_template["Build promotion template"]
  node_grype_template["Grype scan template"]
  node_linter_template["Super-Linter template"]
end

subgraph group_reusable["Reusable workflows"]
  node_gitops_workflow["GitOps PR workflow"]
  node_grype_workflow["Grype scan workflow"]
end

subgraph group_integrations["External integrations"]
  node_docker_build_workflow["Docker build workflow"]
  node_super_linter_workflow["Super-Linter workflow"]
  node_grype_action["Grype scan action"]
  node_github["GitHub repositories"]
  node_kubernetes["Kubernetes cluster"]
end

node_maintainer(("Repository maintainer"))

node_maintainer -->|"copies template"| node_docker_template
node_maintainer -->|"copies template"| node_promotion_template
node_maintainer -->|"copies template"| node_grype_template
node_maintainer -->|"copies template"| node_linter_template
node_docker_template -->|"calls build"| node_docker_build_workflow
node_promotion_template -->|"calls build"| node_docker_build_workflow
node_promotion_template -->|"creates deployment PR"| node_gitops_workflow
node_grype_template -->|"calls scan"| node_grype_workflow
node_linter_template -->|"calls linter"| node_super_linter_workflow
node_grype_workflow -->|"runs scan"| node_grype_action
node_gitops_workflow -->|"opens PR"| node_github
node_github -.->|"deploys image"| node_kubernetes

click node_docker_template "https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build.yaml"
click node_promotion_template "https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build-promotion.yaml"
click node_grype_template "https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-grype-scan-image.yaml"
click node_linter_template "https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-super-linter.yaml"
click node_gitops_workflow "https://github.com/bretfisher/github-actions-templates/blob/main/.github/workflows/reusable-gitops-pr.yaml"
click node_grype_workflow "https://github.com/bretfisher/github-actions-templates/blob/main/.github/workflows/reusable-grype-scan-image.yaml"

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_docker_template,node_promotion_template,node_grype_template,node_linter_template toneBlue
class node_gitops_workflow,node_grype_workflow toneAmber
class node_docker_build_workflow,node_super_linter_workflow,node_grype_action,node_github,node_kubernetes toneMint
class node_maintainer toneIndigo
```

## Components

### Calling templates

- [Docker build template](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build.yaml): `templates/call-docker-build.yaml`
- [Build promotion template](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-docker-build-promotion.yaml): `templates/call-docker-build-promotion.yaml`
- [Grype scan template](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-grype-scan-image.yaml): `templates/call-grype-scan-image.yaml`
- [Super-Linter template](https://github.com/bretfisher/github-actions-templates/blob/main/templates/call-super-linter.yaml): `templates/call-super-linter.yaml`

### Reusable workflows

- [GitOps PR workflow](https://github.com/bretfisher/github-actions-templates/blob/main/.github/workflows/reusable-gitops-pr.yaml): `.github/workflows/reusable-gitops-pr.yaml`
- [Grype scan workflow](https://github.com/bretfisher/github-actions-templates/blob/main/.github/workflows/reusable-grype-scan-image.yaml): `.github/workflows/reusable-grype-scan-image.yaml`

### External integrations

- **Docker build workflow**
- **Super-Linter workflow**
- **Grype scan action**
- **GitHub repositories**
- **Kubernetes cluster**

### Other components

- **Repository maintainer**

## Connections

- Repository maintainer → Docker build template: copies template (evidence: `README.md`)
- Repository maintainer → Build promotion template: copies template (evidence: `README.md`)
- Repository maintainer → Grype scan template: copies template (evidence: `README.md`)
- Repository maintainer → Super-Linter template: copies template (evidence: `README.md`)
- Docker build template → Docker build workflow: calls build (evidence: `README.md`)
- Build promotion template → Docker build workflow: calls build (evidence: `README.md`)
- Build promotion template → GitOps PR workflow: creates deployment PR (evidence: `README.md`)
- Grype scan template → Grype scan workflow: calls scan (evidence: `README.md`)
- Super-Linter template → Super-Linter workflow: calls linter (evidence: `README.md`)
- Grype scan workflow → Grype scan action: runs scan (evidence: `README.md`)
- GitOps PR workflow → GitHub repositories: opens PR (evidence: `README.md`)
- GitHub repositories → Kubernetes cluster: deploys image
