# packtpublishing/mastering-github-actions architecture

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

- Interactive diagram: https://gitdiagram.com/packtpublishing/mastering-github-actions
- Repository: https://github.com/packtpublishing/mastering-github-actions

## Overview

This repository is a book’s collection of GitHub Actions examples, not one integrated application. Its examples span Node.js builds and deployments, reusable workflows, repository and team automation, operational reporting, and a browser-based repository catalog. One concrete runtime path is the Rich Checks action: it validates optional annotation and image inputs, then creates or updates a GitHub check run. The excerpts do not establish connections between most chapter examples, so those are shown as separate capabilities rather than an invented end-to-end pipeline.

Main entry points: [`Chapter 9/richchecks1.0/index.js`](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/index.js) (Rich Checks), [`Chapter 14/My.GitHubOrg/scripts/index.js`](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%2014/My.GitHubOrg/scripts/index.js) (Repository Catalog UI), [`Chapter 7/nodeapp/server.js`](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%207/nodeapp/server.js) (Node Server), [`Chapter 9/richchecks1.0/validateAnnotationsArray.js`](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/validateAnnotationsArray.js) (Annotation Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_checks["Check Action"]
  node_action_entry["Rich Checks<br/>[index.js]"]
  node_annotation_validation["Annotation Validation"]
  node_image_validation["Image Validation"]
end

subgraph group_apps["Node Examples"]
  node_chapter2_app["Hello World App<br/>[index.js]"]
  node_chapter5_app["Node App<br/>[index.js]"]
  node_chapter7_server["Node Server<br/>[server.js]"]
  node_chapter7_app["Random Number App<br/>[index.js]"]
  node_build_workflows["Build Workflows<br/>[workflows]"]
  node_reusable_workflows["Reusable Workflows<br/>[workflows]"]
  node_deployment_workflows["Deployment Workflows<br/>[workflows]"]
end

subgraph group_automation["GitHub Automation"]
  node_org_workflows["Org Workflows<br/>[workflows]"]
  node_event_workflows["Event Workflows<br/>[workflows]"]
  node_slack_action["Slack Alert Action<br/>[action.yml]"]
  node_finops_workflows["FinOps Workflows<br/>[workflows]"]
  node_quality_workflows["Quality Workflows<br/>[workflows]"]
end

subgraph group_catalog["Repository Catalog"]
  node_catalog_ui["Repository Catalog UI<br/>[index.js]"]
  node_catalog_data[("Repository Data<br/>[My.GitHubOrg]")]
end

node_github_checks{{"GitHub Checks API"}}
node_catalog_user(("Catalog Visitor"))

node_action_entry -->|"validates annotations"| node_annotation_validation
node_action_entry -->|"validates images"| node_image_validation
node_action_entry -->|"creates or updates"| node_github_checks
node_chapter7_server -->|"imports app"| node_chapter7_app
node_catalog_user -.->|"views catalog"| node_catalog_ui
node_catalog_ui -->|"loads repos.json"| node_catalog_data

click node_action_entry "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/index.js"
click node_annotation_validation "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/validateAnnotationsArray.js"
click node_image_validation "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/validateImagesArray.js"
click node_chapter2_app "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%202/app/index.js"
click node_chapter5_app "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%205/app/src/index.js"
click node_chapter7_server "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%207/nodeapp/server.js"
click node_chapter7_app "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%207/nodeapp/index.js"
click node_build_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%202/.github/workflows"
click node_reusable_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%203/.github/workflows"
click node_deployment_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%207/GHA.Private.Templates/.github/workflows"
click node_org_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2012/commandcentre.github/.github/workflows"
click node_event_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2014/EventHub.GitHub/.github/workflows"
click node_slack_action "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%2014/EventHub.GitHub/.github/actions/new-repository-alert-slack/action.yml"
click node_finops_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2015/FinOps.GitHub/.github/workflows"
click node_quality_workflows "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2016/scratchpad/.github/workflows"
click node_catalog_ui "https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%2014/My.GitHubOrg/scripts/index.js"
click node_catalog_data "https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2014/My.GitHubOrg"

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_action_entry,node_annotation_validation,node_image_validation toneBlue
class node_chapter2_app,node_chapter5_app,node_chapter7_server,node_chapter7_app,node_build_workflows,node_reusable_workflows,node_deployment_workflows toneAmber
class node_org_workflows,node_event_workflows,node_slack_action,node_finops_workflows,node_quality_workflows,node_github_checks toneMint
class node_catalog_ui,node_catalog_data toneRose
class node_catalog_user toneIndigo
```

## Components

### Check Action

- [Rich Checks](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/index.js): `Chapter 9/richchecks1.0/index.js`
- [Annotation Validation](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/validateAnnotationsArray.js): `Chapter 9/richchecks1.0/validateAnnotationsArray.js`
- [Image Validation](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%209/richchecks1.0/validateImagesArray.js): `Chapter 9/richchecks1.0/validateImagesArray.js`

### Node Examples

- [Hello World App](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%202/app/index.js): `Chapter 2/app/index.js`
- [Node App](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%205/app/src/index.js): `Chapter 5/app/src/index.js`
- [Node Server](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%207/nodeapp/server.js): `Chapter 7/nodeapp/server.js`
- [Random Number App](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%207/nodeapp/index.js): `Chapter 7/nodeapp/index.js`
- [Build Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%202/.github/workflows): `Chapter 2/.github/workflows`
- [Reusable Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%203/.github/workflows): `Chapter 3/.github/workflows`
- [Deployment Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%207/GHA.Private.Templates/.github/workflows): `Chapter 7/GHA.Private.Templates/.github/workflows`

### GitHub Automation

- [Org Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2012/commandcentre.github/.github/workflows): `Chapter 12/commandcentre.github/.github/workflows`
- [Event Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2014/EventHub.GitHub/.github/workflows): `Chapter 14/EventHub.GitHub/.github/workflows`
- [Slack Alert Action](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%2014/EventHub.GitHub/.github/actions/new-repository-alert-slack/action.yml): `Chapter 14/EventHub.GitHub/.github/actions/new-repository-alert-slack/action.yml`
- [FinOps Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2015/FinOps.GitHub/.github/workflows): `Chapter 15/FinOps.GitHub/.github/workflows`
- [Quality Workflows](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2016/scratchpad/.github/workflows): `Chapter 16/scratchpad/.github/workflows`

### Repository Catalog

- [Repository Catalog UI](https://github.com/packtpublishing/mastering-github-actions/blob/main/Chapter%2014/My.GitHubOrg/scripts/index.js): `Chapter 14/My.GitHubOrg/scripts/index.js`
- [Repository Data](https://github.com/packtpublishing/mastering-github-actions/tree/main/Chapter%2014/My.GitHubOrg): `Chapter 14/My.GitHubOrg`

### Other components

- **GitHub Checks API**
- **Catalog Visitor**

## Connections

- Rich Checks → Annotation Validation: validates annotations (evidence: `Chapter 9/richchecks1.0/index.js`)
- Rich Checks → Image Validation: validates images (evidence: `Chapter 9/richchecks1.0/index.js`)
- Rich Checks → GitHub Checks API: creates or updates (evidence: `Chapter 9/richchecks1.0/index.js`)
- Node Server → Random Number App: imports app (evidence: `Chapter 7/nodeapp/server.js`)
- Catalog Visitor → Repository Catalog UI: views catalog
- Repository Catalog UI → Repository Data: loads repos.json (evidence: `Chapter 14/My.GitHubOrg/scripts/index.js`)
