diff --git a/.claude/instructions.md b/.claude/instructions.md index 23dc2e8..b0bd96e 100644 --- a/.claude/instructions.md +++ b/.claude/instructions.md @@ -246,5 +246,5 @@ Examples should work across: --- -**Last Updated**: 2026-02-18 +**Last Updated**: 2026-02-20 **Purpose**: Guide Claude when working on the MCP server repository and client projects diff --git a/CHANGELOG.md b/CHANGELOG.md index 328f602..6b7642e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -813,4 +813,4 @@ Initial release with core DevOps practices extracted from multiple infrastructur **Maintainer:** Uttam Jaiswal **Repository:** devops-practices-mcp -**Last Updated:** 2026-02-17 +**Last Updated:** 2026-02-20 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ebe572..7a82c14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Thank you for contributing! This guide will help you understand our workflow and ```bash # Clone repository to the recommended location -git clone ~/.mcp-servers/devops-practices +git clone https://github.com/ai-4-devops/devops-practices.git ~/.mcp-servers/devops-practices cd ~/.mcp-servers/devops-practices # Install dependencies (using modern tooling - recommended) @@ -144,8 +144,8 @@ git push origin feature/add-security-practice **4. Create Merge Request** -- Go to GitLab -- Create MR: `feature/add-security-practice` → `develop` +- Go to GitHub +- Create PR: `feature/add-security-practice` → `develop` - Wait for CI/CD pipeline to pass - Request code review - Address feedback if needed @@ -154,7 +154,7 @@ git push origin feature/add-security-practice **5. Cleanup** ```bash -# After MR is merged +# After PR is merged git checkout develop git pull origin develop @@ -190,7 +190,7 @@ git checkout develop git pull origin develop git checkout -b feature/fix-template-typo -# Fix, commit, create MR → develop +# Fix, commit, create PR → develop ``` **Critical Production Bugs** (hotfix): @@ -209,7 +209,7 @@ git add mcp-server.py git commit -m "Fix critical crash in MCP server template rendering" git push origin hotfix/mcp-server-crash -# Create MR → main (fast-track approval) +# Create PR → main (fast-track approval) # After merge to main: # Also merge to develop @@ -254,7 +254,7 @@ All branches run automated checks: ### Requesting Review -**Good MR Description**: +**Good PR Description**: ```markdown ## Summary Add security best practices covering secrets management, access control, and audit logging. @@ -273,7 +273,7 @@ Add security best practices covering secrets management, access control, and aud Closes #42 ``` -### Reviewing Others' MRs +### Reviewing Others' PRs **Check**: - [ ] Clear, descriptive commit messages @@ -330,9 +330,9 @@ git commit -m "Prepare v1.2.0 release" git push origin release/v1.2.0 ``` -**3. Create MR → main** +**3. Create PR → main** -- Create MR: `release/v1.2.0` → `main` +- Create PR: `release/v1.2.0` → `main` - Get approval from team - Ensure CI/CD passes - Merge to main @@ -498,7 +498,7 @@ feature/WIP # Not clear - **[git-practices.md](practices/git-practices.md)** - Detailed git workflows ### Questions -- Open an issue on GitLab +- Open an issue on GitHub - Ask in team Slack channel - Contact: Uttam Jaiswal (maintainer) @@ -525,5 +525,5 @@ feature/WIP # Not clear --- **Maintained By**: Uttam Jaiswal -**Last Updated**: 2026-02-14 -**Version**: 1.2.0 +**Last Updated**: 2026-02-20 +**Version**: 1.4.0 diff --git a/PRACTICE-INDEX.md b/PRACTICE-INDEX.md index 4a02b95..a213392 100644 --- a/PRACTICE-INDEX.md +++ b/PRACTICE-INDEX.md @@ -399,5 +399,5 @@ Are you deploying infrastructure? --- -**Last Updated:** 2026-02-17 +**Last Updated:** 2026-02-20 **Related:** [README.md](README.md) | [CHANGELOG.md](CHANGELOG.md) diff --git a/QUICK-START.md b/QUICK-START.md index 8710566..a78cb70 100644 --- a/QUICK-START.md +++ b/QUICK-START.md @@ -52,7 +52,7 @@ network-infra/CLAUDE.md → ~150 lines (only networking-specific) ### MCP Server + CI/CD + Tools - **mcp-server.py** - Python MCP server (5 tools: list/get practices & templates, render templates) - **health-check.sh** - Comprehensive validation script (14 checks) -- **.gitlab-ci.yml** - Automated CI/CD pipeline (validates all changes) +- **.github/workflows/ci.yml** - Automated GitHub Actions pipeline (validates all changes) - **CONTRIBUTING.md** ⭐ - Complete contribution guide with GitLab Flow workflows - **tools/issue-manager.sh** 🆕 - CLI tool for issue management (Advanced) - Zero dependencies for MCP server (Python stdlib only) @@ -69,7 +69,7 @@ This keeps MCP servers organized and makes configuration easier. ```bash # Clone to recommended location -git clone ~/.mcp-servers/devops-practices +git clone https://github.com/ai-4-devops/devops-practices.git ~/.mcp-servers/devops-practices cd ~/.mcp-servers/devops-practices # Install dependencies (if needed) @@ -315,7 +315,7 @@ When creating a new project: | [CHANGELOG.md](CHANGELOG.md) | Version history and upgrade guides | | [mcp-server.py](mcp-server.py) | The MCP server (5 tools) | | [health-check.sh](health-check.sh) | Validation script (14 checks) | -| [.gitlab-ci.yml](.gitlab-ci.yml) | CI/CD pipeline configuration | +| [.github/workflows/ci.yml](.github/workflows/ci.yml) | GitHub Actions pipeline configuration | | [practices/](practices/) | 10 practice documents | | [templates/](templates/) | 4 template files | @@ -355,7 +355,7 @@ See [CHANGELOG.md](CHANGELOG.md) for complete version history. **Previous Releases:** - v1.2.0: GitLab Flow branching, CONTRIBUTING.md, enhanced 02-01-git-practices -- v1.1.0: render_template tool, GitLab CI/CD pipeline +- v1.1.0: render_template tool, GitHub Actions pipeline - v1.0.0: runbook-documentation, configuration-management, readme-maintenance --- @@ -382,5 +382,5 @@ Now that you have the MCP server set up, if you want to contribute improvements: **Questions?** See [SETUP.md](SETUP.md) for detailed troubleshooting. **Maintained By**: Uttam Jaiswal -**Last Updated**: 2026-02-17 -**Version**: 1.3.0 \ No newline at end of file +**Last Updated**: 2026-02-20 +**Version**: 1.4.0 \ No newline at end of file diff --git a/README.md b/README.md index fbe7b23..771efc9 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,123 @@ [![CI/CD Pipeline](https://github.com/ai-4-devops/devops-practices/actions/workflows/ci.yml/badge.svg)](https://github.com/ai-4-devops/devops-practices/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Version](https://img.shields.io/badge/version-1.3.0-blue.svg)](https://github.com/ai-4-devops/devops-practices/releases) -[![MCP Server](https://img.shields.io/badge/MCP-Server-purple.svg)](https://modelcontextprotocol.io) +[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)](https://github.com/ai-4-devops/devops-practices/releases) +[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-Published-green.svg)](https://registry.modelcontextprotocol.io/?search=devops-practices) +[![PyPI](https://img.shields.io/pypi/v/devops-practices-mcp.svg)](https://pypi.org/project/devops-practices-mcp/) mcp-name: io.github.ai-4-devops/devops-practices -**Purpose**: Centralized DevOps practices and standards for infrastructure projects. +**Purpose**: Productivity framework for DevOps engineers using AI assistance (Claude Code) while working on PoCs. **Type**: Model Context Protocol (MCP) Server for Claude Code -**Version**: 1.3.0 +**Version**: 1.4.0 + +**Status**: 🎉 **Officially Published** in the [MCP Registry](https://registry.modelcontextprotocol.io/?search=devops-practices) (Published: February 18, 2026) + +--- + +> **Who is this for?** DevOps engineers using **Claude Code (VS Code plugin)** for PoC development. +> **What it does:** Provides structure (TRACKER, ISSUES, docs, SoPs) so you can focus on building without worrying about documentation overhead. +> **What it's NOT:** Not a DevOps tutorial - it's a productivity framework for AI-assisted development. + +--- + +## Why This MCP Server? + +**Solves the CLAUDE.md Bloat Problem** + +Tired of maintaining massive CLAUDE.md files (1000+ lines) across multiple projects? This MCP centralizes reusable DevOps instructions for engineers working on multiple PoCs, eliminating repeated instructions across projects and folders. + +**The Problem:** +- ❌ Large CLAUDE.md files eat up context window +- ❌ Same practices duplicated across every project +- ❌ Reinventing TRACKER.md, ISSUES.md, docs, SoPs for every PoC +- ❌ Inconsistent standards across projects +- ❌ Context wasted on instructions instead of actual work + +**The Solution:** +- ✅ **Pre-built structure** - Templates for TRACKER, ISSUES, docs, SoPs +- ✅ **Focus on work** - Not on "how should I document this?" +- ✅ **Consistency** - Same standards across all your PoCs +- ✅ **Team alignment** - Same patterns enable seamless collaboration and easy handovers across sessions, systems, and team members +- ✅ **Faster startup** - Copy template, start working +- ✅ **Context saved** - No bloated CLAUDE.md files + +**What you get (structure, not knowledge):** +- 📋 **TRACKER.md template** - Start tracking immediately, don't design tracking +- 🐛 **ISSUES.md system** - Start logging issues, don't setup Jira +- 📚 **Documentation standards** - Start writing docs, don't debate structure +- 📖 **Runbook templates** - Start documenting ops, don't create SoP formats +- 🔄 **Session continuity** - Start handoffs, don't design handoff protocols + +When searching "devops" in the MCP Registry (as of February 2026), this is the only result. While other MCPs focus on: +- 🔧 **Development tools** (code generation, testing, debugging) +- 📊 **Data analysis** (databases, APIs, analytics) +- 🎨 **Content creation** (writing, design, media) + +**This MCP provides:** +- 🏗️ **Configuration structure** - How to organize configs per environment, generate new env configs from completed ones, create and validate SoPs +- 📚 **Documentation patterns** - TRACKER, ISSUES, docs, runbook templates ready to copy +- 🔄 **Operations templates** - Session handoff, runbook formats, documentation standards +- 🎯 **Structured guidance** - GG-SS organized practices for quick discovery + +**What makes it different:** +- **Prescriptive, not generative** - Provides proven practices, not generated code +- **Infrastructure-first** - Built for ops teams, not developers +- **Reusable patterns** - Templates and standards across all your projects +- **AI-native design** - Organized for Claude to query and apply contextually +- **R&D optimized** - Accelerates proof-of-concept development and experimentation + +**Perfect for:** DevOps engineers using Claude Code (VS Code plugin) to build PoCs and conduct R&D with AI assistance. + +--- + +## How It Works + +**No server management required:** +- ✅ **Auto-start**: Spawns when Claude Code/Desktop starts +- ✅ **Background**: Runs silently while you work +- ✅ **On-demand**: Claude queries practices as needed +- ✅ **Auto-stop**: Shuts down when Claude closes + +**Configuration Options:** + +You can configure the MCP server globally (all projects) or per-project: + +**Option 1: Global Configuration** (`~/.claude.json`) +```json +{ + "mcpServers": { + "devops-practices": { + "command": "python3", + "args": ["-u", "~/.mcp-servers/devops-practices/mcp-server.py"], + "env": {"PYTHONUNBUFFERED": "1"} + } + } +} +``` + +**Option 2: Project-Level Configuration** (`.mcp.json` in project root) +```json +{ + "mcpServers": { + "devops-practices": { + "command": "python3", + "args": ["-u", "~/.mcp-servers/devops-practices/mcp-server.py"], + "env": {"PYTHONUNBUFFERED": "1"} + } + } +} +``` + +**Setup Steps:** +1. Install the MCP server (see Installation section below) +2. Add configuration to `~/.claude.json` (global) or `.mcp.json` (per-project) +3. Restart Claude Code/Desktop +4. MCP server runs automatically - no manual startup needed + +**Note**: The `-u` flag and `PYTHONUNBUFFERED` ensure real-time logging for debugging. --- @@ -73,7 +180,7 @@ devops-practices-mcp/ ├── README.md # This file ├── mcp-server.py # MCP server implementation ├── requirements.txt # Python dependencies -├── .gitlab-ci.yml # GitLab CI/CD pipeline +├── .github/workflows/ci.yml # GitHub Actions pipeline ├── health-check.sh # Health validation script ├── practices/ # Shared practice documents (11 files, GG-SS organized) │ ├── 01-01-session-continuity.md @@ -142,7 +249,7 @@ All `${...}` placeholders in the template are replaced with provided values. ## CI/CD Pipeline -This repository includes a **GitLab CI/CD pipeline** (`.gitlab-ci.yml`) that automatically validates changes: +This repository includes a **GitHub Actions pipeline** (`.github/workflows/ci.yml`) that automatically validates changes: ### Pipeline Jobs @@ -163,7 +270,7 @@ This repository includes a **GitLab CI/CD pipeline** (`.gitlab-ci.yml`) that aut ### Pipeline Status -Check pipeline status in GitLab: +Check pipeline status in GitHub: - **Green checkmark** ✅ - All checks passed, safe to merge - **Red X** ❌ - Checks failed, review errors before merging @@ -236,65 +343,130 @@ Claude has access to shared DevOps practices via MCP: ## Installation & Setup -**Recommended Location**: `~/.mcp-servers/devops-practices/` +### 🔧 Manual Installation (Most Stable - Recommended for Development) -This keeps MCP servers organized and makes configuration easier. All examples below use this location. +**Best for:** Developers, contributors, or anyone who wants full control -### 1. Clone Repository +#### 1. Clone Repository ```bash # Clone to recommended location -git clone ~/.mcp-servers/devops-practices +git clone https://github.com/ai-4-devops/devops-practices.git ~/.mcp-servers/devops-practices cd ~/.mcp-servers/devops-practices ``` -### 2. Install Dependencies - -**Using uv (recommended - 10-100x faster):** +#### 2. Install Dependencies ```bash -# Install uv if not already installed +# Using uv (10-100x faster) curl -LsSf https://astral.sh/uv/install.sh | sh - -# Install dependencies uv pip install -r requirements.txt -``` -**Or using traditional pip:** -```bash +# Or using traditional pip pip install -r requirements.txt ``` -**Why uv?** -- 10-100x faster than pip -- Better dependency resolution -- Built in Rust for performance -- Drop-in replacement for pip - -### 3. Configure MCP Server -Edit `~/.config/claude/config.json` (or wherever Claude config lives): - +#### 3. Configure MCP Server +Edit `~/.claude/config.json`: ```json { "mcpServers": { "devops-practices": { - "command": "python", - "args": ["/home//.mcp-servers/devops-practices/mcp-server.py"], - "env": {} + "command": "python3", + "args": ["-u", "~/.mcp-servers/devops-practices/mcp-server.py"], + "env": {"PYTHONUNBUFFERED": "1"} } } } ``` -**Note**: Replace `` with your actual username, or use the full absolute path. +#### 4. Restart Claude Code/Desktop -### 3. Restart Claude Code +#### 5. Verify MCP Connection +Ask Claude: "Can you list the available DevOps practices from the MCP server?" + +**💡 Tip:** Claude may need a reminder to check the MCP. If it doesn't respond with practice names, try: +- "Please verify you can access the devops-practices MCP server" +- "List all available MCP tools" +- Restart Claude Code again + +--- + +### 🧪 Experimental / Testing (For Nerds) + +**⚠️ Note:** These methods are experimental and not yet fully tested. Use Manual Installation (above) for reliable setup. + +**Option 1: MCP Registry via Claude Desktop UI** (Experimental): +1. Open Claude Desktop +2. Go to Settings → Developer → MCP Servers +3. Search for "devops-practices" +4. Click "Install" +5. Restart Claude Code/Desktop + +**Option 2: Install via uvx** (✨ Recommended - automatic venv): +```bash +# Add MCP server using uvx (handles venv automatically) +claude mcp add devops-practices -- uvx devops-practices-mcp + +# Restart Claude Code/Desktop to activate +``` +**Why recommended:** `uvx` automatically manages the virtual environment for you - no setup needed. + +**Option 3: Install with uv + venv** (For Python developers): +```bash +# Install uv if you don't have it +curl -LsSf https://astral.sh/uv/install.sh | sh + +# Create virtual environment +uv venv ~/.venvs/devops-practices-mcp + +# Activate venv +source ~/.venvs/devops-practices-mcp/bin/activate + +# Install MCP server +uv pip install devops-practices-mcp + +# Add to Claude configuration (using venv's python) +claude mcp add devops-practices -- ~/.venvs/devops-practices-mcp/bin/python -m devops_practices_mcp + +# Restart Claude Code/Desktop to activate +``` +**Why use this:** Full control over the virtual environment with modern `uv` tooling. + +**Option 4: Install to user directory** (Legacy - no venv): ```bash -# Restart Claude Code to load the MCP server +# Install using pip (to ~/.local/) +pip install --user devops-practices-mcp + +# Add to Claude configuration +claude mcp add devops-practices -- python3 -m devops_practices_mcp + +# Restart Claude Code/Desktop to activate +``` + +**Option 5: Install system-wide** (Requires sudo): +```bash +# Install system-wide (requires root) +sudo pip install devops-practices-mcp + +# Add to Claude configuration +claude mcp add devops-practices -- python3 -m devops_practices_mcp + +# Restart Claude Code/Desktop to activate ``` -### 4. Test Connection -Ask Claude: "Can you list the available DevOps practices?" +**Option 6: Manual configuration** (Edit config files directly): -Claude should be able to query the MCP server and list practices. +Install via pip or uvx, then edit `~/.claude/config.json`: +```json +{ + "mcpServers": { + "devops-practices": { + "command": "uvx", + "args": ["devops-practices-mcp"], + "env": {} + } + } +} +``` --- @@ -413,8 +585,8 @@ Claude: [Receives rendered template with all variables substituted] Claude: [Creates TRACKER.md with actual values] ``` -### For Uttam Jaiswal -**Update a Practice:** +### Updating Practices +**For Contributors:** ```bash cd devops-practices-mcp vim practices/documentation-standards.md @@ -469,7 +641,7 @@ git checkout develop git checkout -b feature/add-security-practice # Make changes, commit git push origin feature/add-security-practice -# Create MR → develop +# Create PR → develop ``` **Create Release**: @@ -477,7 +649,7 @@ git push origin feature/add-security-practice git checkout develop git checkout -b release/v1.2.0 # Update CHANGELOG.md, version numbers -# Create MR → main +# Create PR → main # Tag release: git tag v1.2.0 # Merge back to develop ``` @@ -487,7 +659,7 @@ git checkout -b release/v1.2.0 git checkout main git checkout -b hotfix/critical-bug # Fix, commit, push -# Create MR → main (fast-track) +# Create PR → main (fast-track) # Also merge to develop ``` @@ -509,14 +681,14 @@ git checkout -b hotfix/critical-bug 2. Update practice or template files 3. Run health check: `bash health-check.sh` 4. Update documentation (README.md, PRACTICE-INDEX.md) -5. Create MR with description → `develop` +5. Create PR with description → `develop` 6. Code review by team 7. Merge to `develop` after CI/CD passes **For Releases**: 1. Create release branch from `develop`: `release/v1.x.0` 2. Update CHANGELOG.md and version numbers -3. Create MR → `main` +3. Create PR → `main` 4. Tag release after merge: `git tag v1.x.0` 5. Merge release back to `develop` 6. Announce to team (affects all dependent projects) @@ -524,7 +696,7 @@ git checkout -b hotfix/critical-bug **For Critical Fixes**: 1. Create hotfix branch from `main`: `hotfix/issue-name` 2. Fix issue and test thoroughly -3. Create MR → `main` (fast-track approval) +3. Create PR → `main` (fast-track approval) 4. Tag hotfix release: `git tag v1.x.1` 5. Merge to `develop` to keep in sync 6. Announce urgent fix to team @@ -582,10 +754,20 @@ git checkout -b hotfix/critical-bug ## Troubleshooting ### Claude Can't Access MCP Server -1. Check MCP server is running: `ps aux | grep mcp-server.py` -2. Check Claude config: `~/.config/claude/config.json` -3. Check file paths are absolute -4. Restart Claude Code + +**Symptoms:** Claude doesn't return practices when asked, or acts like MCP doesn't exist + +**Solutions:** +1. **Remind Claude explicitly:** "Please check the devops-practices MCP server and list available practices" +2. **Verify MCP is loaded:** Ask "What MCP servers do you have access to?" +3. **Check configuration:** Verify `~/.claude/config.json` has correct paths (must be absolute paths) +4. **Restart Claude Code:** MCP servers load on startup +5. **Check logs:** Look at `~/.cache/claude/mcp-devops-practices.log` for errors +6. **Verify MCP process:** Run `ps aux | grep mcp-server.py` to confirm it's running + +**💡 Pro Tip:** Claude sometimes "forgets" to check MCP servers. Explicitly remind it to verify the MCP before proceeding with tasks. + +**Log location:** `~/.cache/claude/mcp-devops-practices.log` ### Practice File Not Found 1. Verify file exists: `ls practices/` @@ -606,5 +788,5 @@ MIT License - Free to use and modify --- **Maintained By**: Uttam Jaiswal -**Last Updated**: 2026-02-17 -**Version**: 1.3.0 \ No newline at end of file +**Last Updated**: 2026-02-20 +**Version**: 1.4.0 \ No newline at end of file diff --git a/mcp-server.py b/mcp-server.py index be83320..05e7a34 100755 --- a/mcp-server.py +++ b/mcp-server.py @@ -186,7 +186,7 @@ def _initialize(self, params: dict[str, Any]) -> dict[str, Any]: }, 'serverInfo': { 'name': 'devops-practices', - 'version': '1.2.0' + 'version': '1.4.0' } } } diff --git a/practices/02-01-git-practices.md b/practices/02-01-git-practices.md index d63d604..e5e4a73 100644 --- a/practices/02-01-git-practices.md +++ b/practices/02-01-git-practices.md @@ -695,16 +695,21 @@ git fetch --prune git branch --merged develop | grep -v "\* develop" | xargs -n 1 git branch -d ``` -**Automation** (GitLab CI/CD): +**Automation** (GitHub Actions): ```yaml -# .gitlab-ci.yml - Auto-delete merged branches -delete-merged-branches: - stage: cleanup - script: - - git fetch --prune - - git branch --merged develop | grep -v "develop\|main" | xargs -n 1 git branch -d - only: - - develop +# .github/workflows/cleanup.yml - Auto-delete merged branches +name: Cleanup Merged Branches +on: + push: + branches: [develop] +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + git fetch --prune + git branch --merged develop | grep -v "develop\|main" | xargs -n 1 git branch -d when: manual ``` diff --git a/server.json b/server.json index e636e14..fdd79a8 100644 --- a/server.json +++ b/server.json @@ -6,12 +6,12 @@ "url": "https://github.com/ai-4-devops/devops-practices", "source": "github" }, - "version": "1.3.1", + "version": "1.4.0", "packages": [ { "registryType": "pypi", "identifier": "devops-practices-mcp", - "version": "1.3.1", + "version": "1.4.0", "transport": { "type": "stdio" }, diff --git a/src/devops_practices_mcp/practices/02-01-git-practices.md b/src/devops_practices_mcp/practices/02-01-git-practices.md index d63d604..e5e4a73 100644 --- a/src/devops_practices_mcp/practices/02-01-git-practices.md +++ b/src/devops_practices_mcp/practices/02-01-git-practices.md @@ -695,16 +695,21 @@ git fetch --prune git branch --merged develop | grep -v "\* develop" | xargs -n 1 git branch -d ``` -**Automation** (GitLab CI/CD): +**Automation** (GitHub Actions): ```yaml -# .gitlab-ci.yml - Auto-delete merged branches -delete-merged-branches: - stage: cleanup - script: - - git fetch --prune - - git branch --merged develop | grep -v "develop\|main" | xargs -n 1 git branch -d - only: - - develop +# .github/workflows/cleanup.yml - Auto-delete merged branches +name: Cleanup Merged Branches +on: + push: + branches: [develop] +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + git fetch --prune + git branch --merged develop | grep -v "develop\|main" | xargs -n 1 git branch -d when: manual ```