# fogproject/fog-workflows architecture

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

- Interactive diagram: https://gitdiagram.com/fogproject/fog-workflows
- Repository: https://github.com/fogproject/fog-workflows

## Overview

##### Project type and purpose
- This is an open-source automation/CI-CD tool (“fog-workflows”) that defines and runs GitHub Actions workflows to support releases and other automations across FOGProject repositories.
- Key indicators: presence of `.github/workflows` directory, YAML workflow files, README stating “running the main workflows for releases and other automations.”

##### File structure
- Top-level directories/files:
- `.github/workflows/`: contains the CI/CD pipeline definitions
- two workflow files: `fog-release-immortality.yml` and `stable-releases.yml`
- standard metadata: `LICENSE`, `README.md`, `.gitignore`
- No application code; all logic lives in workflow definitions.
- Workflows likely trigger on pushes, tag creations, or schedules, and then orchestrate steps such as checking out code, building artifacts, publishing releases, and notifying stakeholders.

##### README for additional insights
- The README confirms the repo’s sole purpose: orchestrate the “main workflows for releases and other automations” for FOGProject.

##### Elements
- Labels: each component clearly named (e.g., “fog-release-immortality workflow”)
- Event sources (ovals)

##### Final advice
- Branching logic (e.g., conditional steps for immortality vs. stable releases)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Event Sources
    subgraph "Event Sources"
        direction TB
        Push["push/tag trigger"]:::event
        Schedule["schedule (cron)"]:::event
    end

    %% Runner
    GitHubRunner["GitHub Actions Runner"]:::runner

    %% Workflows
    subgraph "Workflows" 
        direction TB
        FogRelease["fog-release-immortality.yml"]:::workflow
        StableReleases["stable-releases.yml"]:::workflow
    end

    %% Steps inside workflows (abstract)
    FogRelease -->|"checkout → build → publish → notify"| StableReleases
    %% (Note: This arrow is just placeholder for abstract flow; actual execution is separate)

    %% External Services
    subgraph "External Services"
        direction TB
        ArtifactReg["Artifact Registry"]:::external
        ReleasesAPI["GitHub Releases API"]:::external
        Notifications["Slack / Email"]:::external
    end

    %% Downstream Repos
    subgraph "Downstream FOGProject Repos"
        direction TB
        RepoA["Repo A"]:::downstream
        RepoB["Repo B"]:::downstream
    end

    %% Metadata & Docs
    subgraph "Project Metadata & Documentation"
        direction TB
        README["README.md"]:::meta
        LICENSE["LICENSE"]:::meta
        Gitignore[".gitignore"]:::meta
    end

    %% Root
    RepoRoot["Project Root"]:::meta

    %% Connections
    Push -->|triggers| GitHubRunner
    Schedule -->|triggers| GitHubRunner
    GitHubRunner -->|loads workflows| FogRelease
    GitHubRunner -->|loads workflows| StableReleases

    FogRelease -->|upload artifact| ArtifactReg
    FogRelease -->|create release| ReleasesAPI
    FogRelease -->|send notification| Notifications
    FogRelease -->|propagate changes| RepoA
    FogRelease -->|propagate changes| RepoB

    StableReleases -->|upload artifact| ArtifactReg
    StableReleases -->|create release| ReleasesAPI
    StableReleases -->|send notification| Notifications
    StableReleases -->|propagate changes| RepoA
    StableReleases -->|propagate changes| RepoB

    RepoRoot --> README
    RepoRoot --> LICENSE
    RepoRoot --> Gitignore
    RepoRoot --> WorkflowsDir[".github/workflows/"]:::meta

    %% Click Events
    click FogRelease "https://github.com/fogproject/fog-workflows/blob/main/.github/workflows/fog-release-immortality.yml"
    click StableReleases "https://github.com/fogproject/fog-workflows/blob/main/.github/workflows/stable-releases.yml"
    click WorkflowsDir "https://github.com/fogproject/fog-workflows/tree/main/.github/workflows/"
    click README "https://github.com/fogproject/fog-workflows/blob/main/README.md"
    click LICENSE "https://github.com/fogproject/fog-workflows/tree/main/LICENSE"
    click Gitignore "https://github.com/fogproject/fog-workflows/blob/main/.gitignore"
    click RepoRoot "https://github.com/fogproject/fog-workflows/blob/main/."

    %% Styles
    classDef event fill:#e3fcef,stroke:#02733e,color:#02733e;
    classDef runner fill:#e0f0ff,stroke:#0066b8,color:#0066b8;
    classDef workflow fill:#f3e0ff,stroke:#8a2be2,color:#8a2be2;
    classDef external fill:#fff4e6,stroke:#ff8c00,color:#ff8c00;
    classDef downstream fill:#e6f7ff,stroke:#0099cc,color:#0099cc;
    classDef meta fill:#f5f5f5,stroke:#999999,color:#333333;
```
