# jianan1104/devopsday-taipei-2025-github-actions-workshop architecture

> Architecture diagram of the GitHub repository jianan1104/devopsday-taipei-2025-github-actions-workshop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jianan1104/devopsday-taipei-2025-github-actions-workshop
- Repository: https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop

## Overview

##### Project type and purpose
- This is not a full-stack application but a DevOps workshop repository demonstrating GitHub Actions workflows.
- The purpose is to teach how to set up CI/CD pipelines using three example workflows: a basic pipeline, a “cancel in-progress” pipeline, and a Python app pipeline.

##### File structure
- Top-level directories and files:
- .github/workflows/ — contains three YAML workflow definitions: basic.yml, cancel-in-progress.yml, python-app.yml
- tests/ — contains test code (tests/test_sample.py)
- README.md & LICENSE — project metadata
- No backend or frontend directories; focus is on CI pipelines.
- The presence of basic.yml and python-app.yml indicates separate CI jobs, and cancel-in-progress.yml introduces control logic (event cancellation).

##### README for additional insights
- The README confirms this is a “DevopsDay Taipei 2025 Github Actions Workshop.”
- No runtime architecture is described; all logic resides in GitHub Actions workflows.

a. Main components
- Developer workstation (local git)
- GitHub repository (with .github/workflows)
- Workflow triggers (push, pull_request, workflow_run)
- GitHub Actions runners (hosted or self-hosted)
- Job containers or VMs (setup-python, run tests)
- Test framework (pytest)
- GitHub status checks & UI feedback

b. Relationships and interactions

c. Architectural patterns and design principles
- Event-driven CI pipeline: workflows start on specific GitHub events
- Separation of concerns: each workflow YAML defines discrete jobs
- Idempotence and safe cancellation: cancel-in-progress workflow prevents duplicate concurrent runs

d. Relevant technologies, frameworks, or libraries
- GitHub Actions platform
- actions/checkout, actions/setup-python official actions
- Python 3.x environment
- pytest testing framework

##### Elements
- Clear component labels (e.g., “GitHub Repo,” “Runner VM,” “pytest Job”)

##### Detailed breakdown of components (expand as needed)
- Developer IDE / CLI
- Git push / PR event
- GitHub Events API
- Workflow: basic.yml
– Job: build step(s)
- Workflow: cancel-in-progress.yml
– Job: automatic cancellation of previous runs
- Workflow: python-app.yml
– Job: setup-python, install dependencies, run pytest on tests/test_sample.py
- GitHub Actions runner pools (hosted vs. self-hosted)
- Fate of job logs/artifacts

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer and Repo
    Dev["Developer CLI/IDE"]:::code
    Repo["GitHub Repository"]:::github
    WorkflowsDir[".github/workflows"]:::code

    %% Workflows Subgraph
    subgraph "Workflows"
        Basic["Basic Pipeline\nbasic.yml"]:::workflow
        Cancel["Cancel-In-Progress Pipeline\ncancel-in-progress.yml"]:::workflow
        PythonApp["Python App Pipeline\npython-app.yml"]:::workflow
    end

    %% Runner and Job Subgraph
    Runner["Runner VM/Container"]:::github
    subgraph "Python App Job"
        Checkout["Checkout Code"]:::workflow
        Setup["Setup Python Env"]:::workflow
        RunTests["Run pytest Tests"]:::workflow
        Tests["tests/test_sample.py"]:::code
    end

    Status["GitHub Status Checks & UI"]:::github

    %% Connections
    Dev -->|"push/PR event"| Repo
    Repo -->|"push, pull_request"| Basic
    Repo -->|"push, pull_request"| PythonApp
    Repo -->|"workflow_run event"| Cancel
    Basic -->|"trigger"| Runner
    PythonApp -->|"trigger"| Runner
    Cancel -.->|"cancel previous runs"| Runner:::cancelArrow
    Runner --> Checkout
    Checkout --> Setup
    Setup --> RunTests
    RunTests --> Tests
    RunTests -->|"report results"| Status
    Status -->|"feedback"| Dev

    %% Click Events
    click Basic "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/blob/main/.github/workflows/basic.yml"
    click Cancel "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/blob/main/.github/workflows/cancel-in-progress.yml"
    click PythonApp "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/blob/main/.github/workflows/python-app.yml"
    click WorkflowsDir "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/tree/main/.github/workflows"
    click Tests "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/blob/main/tests/test_sample.py"
    click TestsDir "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/tree/main/tests"
    click README "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/blob/main/README.md"
    click License "https://github.com/jianan1104/devopsday-taipei-2025-github-actions-workshop/tree/main/LICENSE"

    %% Styles
    classDef github fill:#bbeeff,stroke:#3399cc,color:#000;
    classDef workflow fill:#ccffcc,stroke:#33aa33,color:#000;
    classDef code fill:#dddddd,stroke:#888888,color:#000;
    classDef cancelArrow stroke:red,stroke-dasharray:5 5;
```
