release.ymlβ’7.82 kB
name: π Release ARC MCP Server
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: 'Custom tag for manual release'
required: false
default: ''
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
NODE_VERSION: '18'
jobs:
test:
name: π§ͺ Test & Build
runs-on: ubuntu-latest
steps:
- name: π₯ Checkout
uses: actions/checkout@v4
- name: π§ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: π¦ Install dependencies
run: npm ci
- name: π Lint
run: npm run lint || true
- name: ποΈ Build
run: npm run build
- name: β
Validate Policy Engine
run: |
node --input-type=module -e "
Promise.all([
import('@kubernetes/client-node'),
import('./build/engines/policy-engine.js')
]).then(([k8s, policyModule]) => {
const { KubeConfig } = k8s;
const { ArcPolicyEngine } = policyModule;
// Create a mock KubeConfig for testing
const kc = new KubeConfig();
kc.loadFromString(JSON.stringify({
apiVersion: 'v1',
kind: 'Config',
clusters: [{ name: 'test-cluster', cluster: { server: 'https://test' } }],
users: [{ name: 'test-user', user: {} }],
contexts: [{ name: 'test-context', context: { cluster: 'test-cluster', user: 'test-user' } }],
'current-context': 'test-context'
}));
const engine = new ArcPolicyEngine(kc);
const rules = engine.getRules();
console.log('β
Policy Engine: ' + rules.length + ' rules loaded');
});
"
- name: β
Validate NL Parser
run: |
node --input-type=module -e "
import('./build/utils/nl-intent.js').then(({ parseArcIntent }) => {
const testCases = [
'Install ARC controller',
'Scale runners to 5',
'Check ARC compliance',
'List runner scale sets'
];
testCases.forEach(cmd => {
const result = parseArcIntent(cmd);
if (result.intent === 'unknown') throw new Error('Failed to parse: ' + cmd);
console.log('β
Parsed: ' + cmd + ' -> ' + result.intent);
});
});
"
- name: π Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build/
retention-days: 1
docker-build:
name: π³ Build & Push Docker Image
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
steps:
- name: π₯ Checkout
uses: actions/checkout@v4
- name: π§ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: π Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: π·οΈ Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=sha,prefix=main-,enable=${{ github.ref == 'refs/heads/main' }}
labels: |
org.opencontainers.image.title=ARC MCP Server
org.opencontainers.image.description=GitHub Actions Runner Controller MCP Server with AI-powered automation
org.opencontainers.image.vendor=${{ github.repository_owner }}
- name: π³ Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
release:
name: π Create GitHub Release
runs-on: ubuntu-latest
needs: [test, docker-build]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: π₯ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: π Generate changelog
id: changelog
run: |
PREV_TAG=$(git tag --sort=-version:refname | sed -n '2p')
if [ -z "$PREV_TAG" ]; then
PREV_TAG=$(git rev-list --max-parents=0 HEAD)
fi
CHANGELOG_CONTENT="## Changes
$(git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD)
## Features Included
- β
Policy Engine with 11 ARC-specific governance rules
- β
Natural Language Processing (16 ARC intent patterns)
- β
AI-powered ARC installation and management
- β
Comprehensive monitoring and troubleshooting
- β
GitHub Actions integration with kubectl/helm
- β
Multi-architecture Docker registry support
"
echo "changelog<<CHANGELOG_EOF" >> "$GITHUB_OUTPUT"
echo "$CHANGELOG_CONTENT" >> "$GITHUB_OUTPUT"
echo "CHANGELOG_EOF" >> "$GITHUB_OUTPUT"
- name: π Create Release
uses: softprops/action-gh-release@v1
with:
name: ARC MCP Server ${{ github.ref_name }}
body: |
# π ARC MCP Server ${{ github.ref_name }}
Enterprise-grade Model Context Protocol server for GitHub Actions Runner Controller (ARC) management.
## π³ Docker Images
```bash
# Pull the image
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
# Or use latest
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
```
**Multi-architecture support:**
- `linux/amd64` (x86_64)
- `linux/arm64` (ARM64/Apple Silicon)
## βοΈ Usage
**Claude Desktop Configuration:**
```json
{
"mcpServers": {
"arc-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "${HOME}/.kube:/home/mcp/.kube:ro",
"-e", "GITHUB_TOKEN",
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
]
}
}
}
```
## β¨ Key Features
- π€ **AI-Powered Operations**: Natural language ARC management
- π‘οΈ **Policy Engine**: 11 built-in ARC governance rules
- π **Automated Installation**: AI-guided ARC deployment
- π **Monitoring**: Real-time cluster and runner status
- π **Security**: Compliance checking and hardening
- π° **Cost Optimization**: Resource management recommendations
- βΈοΈ **CLI Integration**: kubectl v1.34.1 + helm v3.16.4 included
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false