# sedzisz/semantic-version-action architecture

> Architecture diagram of the GitHub repository sedzisz/semantic-version-action, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sedzisz/semantic-version-action
- Repository: https://github.com/sedzisz/semantic-version-action

## Overview

This GitHub Action turns a configured change token into a semantic-version bump and writes version outputs for the calling workflow. Its main flow validates the mapping, dispatches one of three detection modes, maps the detected token to a bump, reads the latest Git tag, calculates the next version, and writes the result. The README also documents Docker-based use; source excerpts show the runtime logic but not the action or container wiring.

Main entry points: [`entrypoint.py`](https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py) (Action Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Change Detection"]
  node_runtime["Action Runtime<br/>[entrypoint.py]"]
  node_change_source["Change Detection<br/>[entrypoint.py]"]
end

subgraph group_versioning["Version Calculation"]
  node_token_map["Token Mapping<br/>[entrypoint.py]"]
  node_version_calc["Version Calculation<br/>[entrypoint.py]"]
end

subgraph group_outputs["Action Outputs"]
  node_action_outputs(("Workflow Outputs"))
end

node_workflow(("Calling Workflow"))
node_event_context(("GitHub Event Context"))
node_git_repo[("Git Repository")]
node_docker_runner(("Docker Runner"))

node_workflow -->|"starts with inputs"| node_runtime
node_runtime -->|"dispatches detection"| node_change_source
node_event_context -->|"provides labels"| node_change_source
node_git_repo -->|"provides commit or branch"| node_change_source
node_runtime -->|"maps detected token"| node_token_map
node_runtime -->|"reads version tags"| node_git_repo
node_runtime -->|"calculates bump"| node_version_calc
node_runtime -->|"writes outputs"| node_action_outputs
node_docker_runner -.->|"runs container"| node_runtime

click node_runtime "https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py"
click node_change_source "https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py"
click node_token_map "https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py"
click node_version_calc "https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py"

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_runtime,node_change_source toneBlue
class node_token_map,node_version_calc,node_git_repo toneAmber
class node_action_outputs toneMint
class node_workflow,node_event_context,node_docker_runner toneIndigo
```

## Components

### Change Detection

- [Action Runtime](https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py): `entrypoint.py`
- [Change Detection](https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py): `entrypoint.py`

### Version Calculation

- [Token Mapping](https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py): `entrypoint.py`
- [Version Calculation](https://github.com/sedzisz/semantic-version-action/blob/master/entrypoint.py): `entrypoint.py`

### Action Outputs

- **Workflow Outputs**

### Other components

- **Calling Workflow**
- **GitHub Event Context**
- **Git Repository**
- **Docker Runner**

## Connections

- Calling Workflow → Action Runtime: starts with inputs
- Action Runtime → Change Detection: dispatches detection
- GitHub Event Context → Change Detection: provides labels
- Git Repository → Change Detection: provides commit or branch
- Action Runtime → Token Mapping: maps detected token
- Action Runtime → Git Repository: reads version tags
- Action Runtime → Version Calculation: calculates bump
- Action Runtime → Workflow Outputs: writes outputs
- Docker Runner → Action Runtime: runs container
