-
-
Notifications
You must be signed in to change notification settings - Fork 2
04 Workflow Diagram
Umutcan ΓNER edited this page Jun 24, 2025
·
2 revisions
Your visual guide to Zopio's development workflow - See how code flows from your feature branch to production, with automated quality gates, security scans, and release processes at every step.
- π― Overview
- π³ Git Flow Diagram
- π€ CI/CD Pipeline
- π Workflow Triggers Matrix
- π PR Lifecycle
- π Release Automation
- π‘οΈ Security Pipeline
- π·οΈ Labeling System
- β‘ Quick Commands
- π§ Troubleshooting
- πͺ Next Steps
Our workflow orchestrates 13 GitHub Actions workflows to ensure code quality, security, and smooth deployments:
|
|
|
|
See how your code travels from development to production
flowchart TD
subgraph "Feature Development"
Dev[Developer] -->|git checkout -b| Feature[feat/* branch]
Feature -->|commits| LocalWork[Local Development]
LocalWork -->|git push| PR[Pull Request]
end
subgraph "Integration & Testing"
PR -->|targets| Develop[π§ develop]
PR -->|triggers| CI{CI/CD Pipeline}
CI -->|runs| Tests[β
Tests]
CI -->|runs| Lint[π¨ Linting]
CI -->|runs| Build[ποΈ Build]
CI -->|runs| Security[π‘οΈ Security]
Tests & Lint & Build & Security -->|all pass| Review[π Code Review]
Review -->|approved| Merge[π Merge to develop]
end
subgraph "Release Process"
Develop -->|ready for release| Release[release/v*.*.*]
Release -->|PR to| Staging[π§ͺ staging]
Staging -->|E2E tests| QA[QA Testing]
QA -->|approved| Main[π main]
Main -->|triggers| AutoRelease[π¦ Auto Release]
AutoRelease -->|creates| Tag[π·οΈ Git Tag]
AutoRelease -->|generates| Changelog[π Changelog]
AutoRelease -->|publishes| NPM[π¦ NPM]
end
subgraph "Hotfix Flow"
Prod[Production Issue] -->|urgent| Hotfix[hotfix/*]
Hotfix -->|PR to| Main
Hotfix -->|also PR to| Develop
end
style Feature fill:#4ECDC4,stroke:#333,stroke-width:2px
style Develop fill:#6BCF7F,stroke:#333,stroke-width:2px
style Staging fill:#FFD93D,stroke:#333,stroke-width:2px
style Main fill:#FF6B6B,stroke:#333,stroke-width:2px,color:#fff
style Hotfix fill:#F38181,stroke:#333,stroke-width:2px
style AutoRelease fill:#95E1D3,stroke:#333,stroke-width:2px
Automated quality gates for every pull request
flowchart LR
subgraph "Trigger Events"
Push[Push to Branch]
PROpen[PR Opened]
PRSync[PR Synchronized]
Schedule[Scheduled]
Manual[Manual Dispatch]
end
subgraph "Validation Layer"
BranchName[Branch Naming]
PRTitle[PR Title Format]
PRSize[PR Size Check]
Breaking[Breaking Changes]
end
subgraph "Quality Checks"
Biome[Biome Linting]
Vitest[Vitest Tests]
TSC[TypeScript Check]
BuildCheck[Build Verification]
end
subgraph "Security Scans"
CodeQL[CodeQL Analysis]
Trivy[Dependency Scan]
TruffleHog[Secret Detection]
end
subgraph "Automation"
Labels[Auto-label PR]
Assign[Assign Author]
Welcome[Welcome Message]
Status[Update Status]
end
PROpen --> BranchName & PRTitle & PRSize
Push --> Biome & Vitest & TSC & BuildCheck
Push --> CodeQL & Trivy & TruffleHog
PROpen --> Labels & Assign & Welcome
Schedule --> CodeQL & Trivy & TruffleHog
BranchName & PRTitle & PRSize & Breaking -->|must pass| Merge{Can Merge?}
Biome & Vitest & TSC & BuildCheck -->|must pass| Merge
CodeQL & Trivy & TruffleHog -->|must pass| Merge
style Push fill:#4ECDC4
style PROpen fill:#95E1D3
style Schedule fill:#FFD93D
style Merge fill:#6BCF7F
When each workflow runs and what triggers it
Workflow | Push main
|
Push develop
|
Push staging
|
Pull Request | Schedule | Manual | Purpose |
---|---|---|---|---|---|---|---|
ποΈ build.yml | β | β | β | β (to main) | β | β | Comprehensive PR validation |
π ci.yml | β | β | β | β (dev/staging) | β | β | Fast CI checks |
π changelog.yml | β | β | β | β | β | β | Generate changelog |
π¦ release.yml | β | β | β | β | β | β | Auto-publish releases |
π‘οΈ security.yml | β | β | β | β | π Daily | β | Security scanning suite |
β pr-validation.yml | β | β | β | β | β | β | PR format validation |
π·οΈ label.yml | β | β | β | β | β | β | Auto-label PRs |
π€ pr-assignment.yml | β | β | β | β | β | β | Assign PR author |
π welcome.yml | β | β | β | β | β | β | Welcome contributors |
π docs.yml | β | β | β | β (docs) | β | β | Documentation checks |
π§Ή stale.yml | β | β | β | β | π Daily | β | Mark stale items |
π lock-threads.yml | β | β | β | β | π Daily | β | Lock old threads |
- Concurrency Control: All workflows include duplicate prevention
- Conditional Runs: Some workflows only trigger on specific file changes
- Resource Optimization: 40-50% reduction in GitHub Actions usage
What happens when you open a pull request
stateDiagram-v2
[*] --> PROpened: Developer opens PR
PROpened --> Validation: Automatic triggers
state Validation {
[*] --> BranchCheck: Check branch name
[*] --> TitleCheck: Check PR title
[*] --> SizeCheck: Check PR size
BranchCheck --> Valid
TitleCheck --> Valid
SizeCheck --> Valid
}
Validation --> Labeling: All checks pass
state Labeling {
[*] --> TypeLabel: Based on title (feat/fix/docs)
[*] --> PathLabel: Based on files changed
[*] --> SizeLabel: Based on lines changed
TypeLabel --> Labeled
PathLabel --> Labeled
SizeLabel --> Labeled
}
Labeling --> Assignment: Labels applied
Assignment --> Testing: Author assigned
state Testing {
[*] --> Lint: Biome linting
[*] --> Test: Vitest tests
[*] --> Build: Build check
[*] --> Security: Security scans
Lint --> TestsPass
Test --> TestsPass
Build --> TestsPass
Security --> TestsPass
}
Testing --> Review: All tests pass
Review --> Approved: Code review complete
Approved --> Merged: Squash & merge
Merged --> [*]: PR closed
Validation --> FixRequired: Validation fails
Testing --> FixRequired: Tests fail
Review --> FixRequired: Changes requested
FixRequired --> PROpened: Push fixes
How releases are automatically created and published
flowchart TD
subgraph "Release Trigger"
Merge[PR Merged to main] -->|triggers| Release[release.yml]
end
subgraph "Changelog Generation"
Release --> Analyze[Analyze Commits]
Analyze --> Generate[Generate Changelog]
Generate --> Version[Bump Version]
Version --> Commit[Commit Changes]
end
subgraph "Publishing"
Commit --> Tag[Create Git Tag]
Tag --> GHRelease[GitHub Release]
Tag --> NPM[NPM Publish]
GHRelease --> Notify[Notify Team]
end
subgraph "Artifacts"
GHRelease --> Notes[Release Notes]
GHRelease --> Assets[Build Assets]
NPM --> Registry[NPM Registry]
end
style Merge fill:#FF6B6B,color:#fff
style Release fill:#95E1D3
style Tag fill:#FFD93D
style NPM fill:#4ECDC4
Commit Type | Version Bump | Example |
---|---|---|
fix: |
Patch (0.0.X) | 1.2.3 β 1.2.4 |
feat: |
Minor (0.X.0) | 1.2.3 β 1.3.0 |
feat!: or BREAKING CHANGE
|
Major (X.0.0) | 1.2.3 β 2.0.0 |
chore: , docs: , etc. |
No bump | 1.2.3 β 1.2.3 |
Multi-layered security scanning for every change
flowchart TB
subgraph "Security Layers"
Layer1[Code Analysis]
Layer2[Dependency Scanning]
Layer3[Secret Detection]
Layer4[Container Security]
end
subgraph "Scanners"
CodeQL[CodeQL<br/>SAST Analysis]
Trivy[Trivy<br/>CVE Scanner]
TruffleHog[TruffleHog<br/>Secret Scanner]
Container[Container<br/>Scan]
end
subgraph "Triggers"
PR[Pull Request]
Push[Push to Protected]
Daily[Daily Schedule]
end
subgraph "Results"
SARIF[SARIF Reports]
Alerts[Security Alerts]
Block[Block Merge]
Email[Email Notify]
end
PR & Push & Daily --> Layer1 & Layer2 & Layer3 & Layer4
Layer1 --> CodeQL
Layer2 --> Trivy
Layer3 --> TruffleHog
Layer4 --> Container
CodeQL & Trivy & TruffleHog & Container --> SARIF
SARIF --> Alerts
Alerts -->|critical| Block
Alerts -->|high| Email
style Layer1 fill:#FF6B6B
style Layer2 fill:#FFD93D
style Layer3 fill:#4ECDC4
style Layer4 fill:#95E1D3
Scanner | What it Finds | When it Runs | Action on Finding |
---|---|---|---|
CodeQL | Code vulnerabilities, OWASP issues | PR + Daily | Creates security alert |
Trivy | Known CVEs in dependencies | PR + Daily | Blocks if critical |
TruffleHog | Exposed secrets, API keys | PR + Daily | Immediate block |
Container | Docker image vulnerabilities | On Dockerfile change | Advisory alert |
Automatic PR labeling based on your changes
PR Title Prefix | Label Applied | Color |
---|---|---|
feat: |
type: feature |
π’ Green |
fix: |
type: fix |
π΄ Red |
docs: |
type: documentation |
π΅ Blue |
chore: |
type: chore |
π‘ Yellow |
test: |
type: test |
π‘ Yellow |
refactor: |
type: refactor |
π£ Purple |
perf: |
type: performance |
π Orange |
ci: |
type: ci |
π’ Green |
build: |
type: build |
π΅ Blue |
Files Changed | Label Applied |
---|---|
/packages/core/* |
package: core |
/packages/auth* |
package: auth |
/apps/web/* |
app: web |
*.md |
documentation |
package.json |
dependencies |
*.test.ts |
testing |
.github/workflows/* |
ci/cd |
Lines Changed | Label | Description |
---|---|---|
< 10 | size: XS |
Trivial change |
10-100 | size: S |
Small change |
100-500 | size: M |
Medium change |
500-1000 | size: L |
Large change |
> 1000 | size: XL |
Very large change |
Common workflow commands
# Start a new feature
git checkout -b feat/awesome-feature develop
git push -u origin feat/awesome-feature
# Create PR (GitHub CLI)
gh pr create --base develop --title "feat: add awesome feature"
# Check workflow status
gh run list --limit 5
gh run view
# View PR checks
gh pr checks
# View workflow runs
gh workflow list
gh workflow view ci.yml
# Check specific run
gh run view --log
gh run view --log-failed
# Re-run failed workflows
gh run rerun
# Create release branch
git checkout -b release/v1.2.0 develop
git push -u origin release/v1.2.0
# After merge to main, release is automatic
# But you can trigger changelog manually
gh workflow run changelog.yml
Common workflow issues and solutions
Error | Cause | Solution |
---|---|---|
"Invalid branch name" | Wrong naming pattern | Rename to feat/* , fix/* , etc. |
"PR title must be semantic" | Non-conventional title | Use format: type: description
|
"PR too large" | > 1000 lines changed | Split into smaller PRs |
"Breaking change needs docs" |
! without description |
Add "Breaking Changes" section |
# Biome linting errors
pnpm lint:fix
# TypeScript errors
pnpm typecheck
# Test failures
pnpm test:watch
# Build errors
pnpm build
Issue | Severity | Action Required |
---|---|---|
Secret detected | π΄ Critical | Remove immediately, rotate secret |
High CVE in dependency | π High | Update dependency or add override |
CodeQL warning | π‘ Medium | Review and fix if valid |
Now that you understand the workflow, explore these areas:
|
|
Questions? Check GitHub Discussions | Workflow issues? See Actions tab
β¬ Back to Top | β¬ Previous: Branch Types | β‘ Next: Protection Rules