# actions/starter-workflows architecture

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

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

## Overview

##### Main Components
- GitHub Actions Starter Workflows: This is the overall catalog of YAML workflow templates.
- Directories based on workflow purpose:
- CI (Continuous Integration): Contains YAML files and properties (for example, “ci/django.yml”) that facilitate CI tasks.
- Deployments: Contains deployment-specific workflow YAML files for various platforms (AWS, Azure, Google Cloud, etc.) along with properties files.
- Automation: Contains workflow templates for automating common tasks (e.g., greetings, labeling, stale workflows).
- Code Scanning: Comprises various security and code quality scanning workflows.
- Pages: Contains templates related to static site generators and hosting platforms.
- Supporting Assets:
- Additional scripts: Under the “script” directory, with submodules like sync-ghes and validate-data. These scripts likely support external processes or data validation.
- Configuration and Automation Files: The repository’s .github directory, pre-commit, CODEOWNERS, CONTRIBUTING.md, and other meta files help with repository automation and governance.

##### Relationships and Interactions
- That every YAML workflow file is paired with a corresponding .properties.json file in a “properties” subdirectory (for example, “ci/django.yml” with “ci/properties/django.properties.json”).
- External dependencies:
- The GitHub Actions platform which consumes these workflow files and displays metadata from the properties files.
- The integration with hosting providers and external services given the deployment templates.

##### Architectural Patterns and Design Principles
- Modularity: The separation of workflow templates into multiple directories (CI, deployments, etc.) emphasizes modularity and single responsibility.
- Separation of Concerns: Each directory addresses a specific function (e.g., testing vs. deployment vs. code scanning).
- Metadata Driven Design: The use of .properties.json files to supply additional information shows a clear separation between workflow logic and descriptive metadata, enabling flexibility in rendering and categorization on the GitHub UI.

##### Relevant Technologies and Tools
- GitHub Actions: This is the underlying platform that utilizes these YAML workflows.
- YAML and JSON: For workflow definitions and metadata respectively.
- Git and GitHub: Version control and hosting, including the use of GitHub workflows (.github/workflows).
- Integration scripts (in TypeScript): Under the “script” directory, supporting additional operational tasks.

##### Elements
- A clear visual block for each top-level directory: ci, deployments, automation, code-scanning, and pages.
- Labels on each component explaining its role and any dependencies (e.g., “CI Workflows – for running tests and builds”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["GitHub Actions Starter Workflows"]:::main
    B["GitHub Actions Platform"]:::external
    A -->|"triggers"| B

    subgraph "Workflow Categories"
        CI["CI Workflows"]:::ci
        CI_prop["CI Metadata (.properties.json)"]:::metadata
        
        DEP["Deployments Workflows"]:::deploy
        DEP_prop["Deployments Metadata (.properties.json)"]:::metadata
        
        AUTO["Automation Workflows"]:::automation
        AUTO_prop["Automation Metadata (.properties.json)"]:::metadata
        
        CS["Code Scanning Workflows"]:::codeScan
        CS_prop["Code Scanning Metadata (.properties.json)"]:::metadata
        
        PAGES["Pages Workflows"]:::pages
        PAGES_prop["Pages Metadata (.properties.json)"]:::metadata
    end

    CI -->|"metadata"| CI_prop
    DEP -->|"metadata"| DEP_prop
    AUTO -->|"metadata"| AUTO_prop
    CS -->|"metadata"| CS_prop
    PAGES -->|"metadata"| PAGES_prop

    CI_prop ---|"iconName"| ICONS["Supporting Icons"]:::icon
    DEP_prop ---|"iconName"| ICONS
    AUTO_prop ---|"iconName"| ICONS
    CS_prop ---|"iconName"| ICONS
    PAGES_prop ---|"iconName"| ICONS

    A -->|"includes"| SCRIPT["Integration & Utility Scripts"]:::script
    A -->|"governedBy"| CONFIG["Repository Automation/Configuration"]:::config

    %% Click Events
    click CI "https://github.com/actions/starter-workflows/tree/main/ci"
    click DEP "https://github.com/actions/starter-workflows/tree/main/deployments"
    click AUTO "https://github.com/actions/starter-workflows/tree/main/automation"
    click CS "https://github.com/actions/starter-workflows/tree/main/code-scanning"
    click PAGES "https://github.com/actions/starter-workflows/tree/main/pages"
    click ICONS "https://github.com/actions/starter-workflows/tree/main/icons"
    click SCRIPT "https://github.com/actions/starter-workflows/tree/main/script"
    click CONFIG "https://github.com/actions/starter-workflows/blob/main/.github"

    %% Styles
    classDef main fill:#f9f,stroke:#333,stroke-width:2px;
    classDef external fill:#ffcccb,stroke:#333,stroke-width:2px;
    classDef ci fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef deploy fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef automation fill:#ffedcc,stroke:#333,stroke-width:2px;
    classDef codeScan fill:#e6ccff,stroke:#333,stroke-width:2px;
    classDef pages fill:#ffcce6,stroke:#333,stroke-width:2px;
    classDef metadata fill:#e0e0e0,stroke:#333,stroke-width:2px;
    classDef icon fill:#dcdcdc,stroke:#333,stroke-width:2px;
    classDef script fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef config fill:#c6e2ff,stroke:#333,stroke-width:2px;
```
