# boromir674/automated-workflows architecture

> Architecture diagram of the GitHub repository boromir674/automated-workflows, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/boromir674/automated-workflows
- Repository: https://github.com/boromir674/automated-workflows

## Overview

##### Project Type and Purpose
- This is an **open-source tool** consisting of **reusable GitHub Actions workflows** for CI/CD pipelines and GitOps processes.
- Its primary goal is to provide pre-built, configurable workflows (Docker build, Python build & test, PyPI publish, docs build, linting, code visualization, and GitOps PR/status jobs) that teams can call from their own `.github/workflows` files.

##### File Structure Analysis
- **Top-level directories**
- `.github/workflows/` – all workflow YAML definitions (Docker, test_build, pypi_env, policy_docs, lint, python_imports, gitops jobs, etc.)
- `scripts/` – helper scripts to generate docs and workflow references
- **Config files**
- `mkdocs.yml`, `.readthedocs.yaml` – static site build for docs
- `pyproject.toml`, `tox.ini`, `constraints.txt` – Python packaging & testing
- `Dockerfile`, `docker-compose.yml` – containerization for local testing or sample runs
- **CI/CD metadata**
- `.github/workflows/cicd.yml` – tests the workflows themselves
- Labeler, merge, and tag automation under `.github` for repo maintenance

##### README Insights
- Enumerates **Reusable Workflows** and **GitOps Processes**
- Quick-start examples show how to call sub-workflows with `uses:` syntax and pass inputs/secrets
- Emphasizes live docs on ReadTheDocs and integration points (DockerHub, PyPI, ReadTheDocs)

a. **Main Components**
- **GitHub Repository** (code + docs + workflows)
- **GitHub Actions Runner** (executes the workflows)
- **Reusable Workflow Modules** (each YAML under `.github/workflows`)
- **External Services**: DockerHub, PyPI, ReadTheDocs
- **Consumers**: end-user repositories that call these workflows via `uses:`
b. **Relationships & Data Flow**
- Commits/PRs → GitHub Actions Runner → selected Workflow Module → (optional) DockerHub/PyPI/Docs
- Scripts in `/scripts` generate updated docs and workflow references → published to ReadTheDocs
- MkDocs config reads `docs/` → static site build → ReadTheDocs
c. **Architectural Patterns & Principles**
- **Reusability**: each workflow designed as a standalone job with inputs/outputs
- **Separation of Concerns**: CI jobs vs. GitOps jobs vs. doc-generation
- **GitOps**: modeling acceptance policies as single job statuses or multi-step PRs
d. **Key Technologies**

##### Final Advice
- Be **very detailed**: show each workflow as its own block with clear labels.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% GitHub Repository and Runner
    subgraph "GitHub Repository & Runner"
        style GitHubRepo fill:#eef,stroke:#aab
        GitHubRepo["GitHub Repository (code + docs + workflows)"]:::internal
        Runner["GitHub Actions Runner"]:::internal
    end

    %% Reusable Workflow Modules
    subgraph "Reusable Workflow Modules"
        style WorkflowLib fill:#cfe,stroke:#6a6
        DockerWF["Docker Build & Push"]:::workflow
        PyTestWF["Python Build & Test"]:::workflow
        PyPIWF["Publish to PyPI"]:::workflow
        PyPIEnvWF["PyPI Environment Setup"]:::workflow
        DocsWF["Docs Build & Deployment"]:::workflow
        LintWF["Static Analysis (Lint)"]:::workflow
        VizWF["Python Imports Visualization"]:::workflow
        subgraph "GitOps PR/Status Jobs"
            style GitOpsLib fill:#cfe,stroke:#6a6
            GP1["_gitops-pr-to-main.yml"]:::workflow
            GP2["_gitops-pr-to-release.yml"]:::workflow
            GP3["_gitops-delete-tags.yml"]:::workflow
            GP4["_gitops-merge-to-main.yml"]:::workflow
            GP5["_merge-rt-in-release.yml"]:::workflow
            GP6["_merge-to-boarding.yml"]:::workflow
            GP7["_merge-to-train.yml"]:::workflow
            GP8["_pr-to-boarding.yml"]:::workflow
            GP9["_pr-to-master.yml"]:::workflow
            GP10["_start-rt.yml"]:::workflow
            GP11["_tag-prod.yml"]:::workflow
            GP12["_update_test_branch.yml"]:::workflow
        end
    end

    %% CI/CD Metadata and Automations
    subgraph "CI/CD Metadata & Automations"
        style CICD fill:#eef,stroke:#aab
        CICD["cicd.yml (tests workflows)"]:::internal
        subgraph "Repo Maintenance"
            LabelerCfg[".github/labeler.yml"]:::internal
            LabelerWF["_labeler.yml"]:::internal
        end
    end

    %% Documentation Components
    subgraph "Documentation"
        style Docs fill:#ffe,stroke:#dd8,stroke-dasharray:5 5
        DocsSrc["docs/"]:::internal
        APIDocs["docs/api/"]:::internal
        Guides["docs/guides/ & docs/topics/"]:::internal
        Includes["docs/includes/"]:::internal
        MkDocsCfg["mkdocs.yml"]:::internal
        RtdCfg[".readthedocs.yaml"]:::internal
        Scripts["scripts/"]:::internal
    end

    %% Configuration & Containerization
    subgraph "Configs & Containerization"
        style Configs fill:#eef,stroke:#aab
        PyCfg["pyproject.toml / tox.ini / constraints.txt"]:::internal
        DockerCfg["Dockerfile / docker-compose.yml"]:::internal
    end

    %% External Services
    subgraph "External Services"
        style External fill:#fed,stroke:#ea0
        DockerHub["DockerHub"]:::external
        PyPIReg["PyPI Registry"]:::external
        ReadTheDocs["ReadTheDocs"]:::external
    end

    ConsumerRepos["Consumer Repos"]:::consumer

    %% Connections
    GitHubRepo -->|defines workflows| DockerWF
    GitHubRepo -->|defines workflows| PyTestWF
    GitHubRepo -->|defines workflows| PyPIWF
    GitHubRepo -->|defines workflows| PyPIEnvWF
    GitHubRepo -->|defines workflows| DocsWF
    GitHubRepo -->|defines workflows| LintWF
    GitHubRepo -->|defines workflows| VizWF
    GitHubRepo -->|defines workflows| GP1
    GitHubRepo -->|defines workflows| GP2
    GitHubRepo -->|defines workflows| GP3
    GitHubRepo -->|defines workflows| GP4
    GitHubRepo -->|defines workflows| GP5
    GitHubRepo -->|defines workflows| GP6
    GitHubRepo -->|defines workflows| GP7
    GitHubRepo -->|defines workflows| GP8
    GitHubRepo -->|defines workflows| GP9
    GitHubRepo -->|defines workflows| GP10
    GitHubRepo -->|defines workflows| GP11
    GitHubRepo -->|defines workflows| GP12

    GitHubRepo -->|triggers| Runner
    Runner -->|executes| DockerWF
    Runner -->|executes| PyTestWF
    Runner -->|executes| PyPIWF
    Runner -->|executes| PyPIEnvWF
    Runner -->|executes| DocsWF
    Runner -->|executes| LintWF
    Runner -->|executes| VizWF
    Runner -->|executes| GP1
    Runner -->|executes| GP2
    Runner -->|executes| GP3
    Runner -->|executes| GP4
    Runner -->|executes| GP5
    Runner -->|executes| GP6
    Runner -->|executes| GP7
    Runner -->|executes| GP8
    Runner -->|executes| GP9
    Runner -->|executes| GP10
    Runner -->|executes| GP11
    Runner -->|executes| GP12

    DockerWF -->|push image| DockerHub
    PyPIWF -->|publish pkg| PyPIReg
    DocsWF -->|deploy site| ReadTheDocs

    ConsumerRepos -->|calls uses:| DockerWF
    ConsumerRepos -->|calls uses:| PyTestWF
    ConsumerRepos -->|calls uses:| PyPIWF
    ConsumerRepos -->|calls uses:| DocsWF
    ConsumerRepos -->|calls uses:| LintWF
    ConsumerRepos -->|calls uses:| VizWF
    ConsumerRepos -->|calls uses:| GP1

    Scripts -->|generate refs| APIDocs
    DocsSrc -->|site source| ReadTheDocs
    MkDocsCfg -->|configures| ReadTheDocs
    APIDocs -->|includes| DocsSrc
    Guides -->|includes| DocsSrc
    Includes -->|includes| DocsSrc

    %% Click Events
    click GitHubRepo "https://github.com/boromir674/automated-workflows/tree/main//"
    click DockerWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/docker.yml"
    click PyTestWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/test_build.yml"
    click PyPIWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/pypi.yml"
    click PyPIEnvWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/pypi_env.yml"
    click DocsWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/policy_docs.yml"
    click LintWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/lint.yml"
    click VizWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/python_imports.yml"
    click GP1 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_gitops-pr-to-main.yml"
    click GP2 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_gitops-pr-to-release.yml"
    click GP3 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_gitops-delete-tags.yml"
    click GP4 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_gitops-merge-to-main.yml"
    click GP5 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_merge-rt-in-release.yml"
    click GP6 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_merge-to-boarding.yml"
    click GP7 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_merge-to-train.yml"
    click GP8 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_pr-to-boarding.yml"
    click GP9 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_pr-to-master.yml"
    click GP10 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_start-rt.yml"
    click GP11 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_tag-prod.yml"
    click GP12 "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_update_test_branch.yml"
    click CICD "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/cicd.yml"
    click LabelerCfg "https://github.com/boromir674/automated-workflows/blob/main/.github/labeler.yml"
    click LabelerWF "https://github.com/boromir674/automated-workflows/blob/main/.github/workflows/_labeler.yml"
    click DocsSrc "https://github.com/boromir674/automated-workflows/tree/main/docs/"
    click APIDocs "https://github.com/boromir674/automated-workflows/tree/main/docs/api/"
    click Guides "https://github.com/boromir674/automated-workflows/tree/main/docs/guides/"
    click Includes "https://github.com/boromir674/automated-workflows/tree/main/docs/includes/"
    click MkDocsCfg "https://github.com/boromir674/automated-workflows/blob/main/mkdocs.yml"
    click RtdCfg "https://github.com/boromir674/automated-workflows/blob/main/.readthedocs.yaml"
    click Scripts "https://github.com/boromir674/automated-workflows/tree/main/scripts/"
    click PyCfg "https://github.com/boromir674/automated-workflows/blob/main/pyproject.toml"
    click DockerCfg "https://github.com/boromir674/automated-workflows/tree/main/Dockerfile"

    %% Styles
    classDef internal fill:#eef,stroke:#aab
    classDef workflow fill:#cfe,stroke:#6a6
    classDef external fill:#fed,stroke:#ea0
    classDef consumer fill:#ffe,stroke:#d88,stroke-dasharray:5 5
```
