Skip to main content
Glama

github_actions_create_ci

Create GitHub Actions CI/CD workflows to automate testing and deployment processes for your development projects.

Instructions

Generate a CI/CD workflow for the project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.js:1621-1823 (registration)
    MCP tool registration for 'github_actions_create_ci', including name, description, input schema, and handler reference
      "github_actions_create_ci",
      "Generate a CI/CD workflow for the project",
      {
        project_type: {
          type: "string",
          description: "Project type: java-maven, java-gradle, nodejs, python, golang"
        },
        include_docker: { type: "boolean", description: "Include Docker build and GHCR push", default: true },
        include_sonar: { type: "boolean", description: "Include SonarCloud analysis", default: false },
        sonar_org: { type: "string", description: "SonarCloud organization (if include_sonar)", default: "" },
        github_owner: { type: "string", description: "GitHub owner for GHCR push" }
      },
      async ({ project_type, include_docker, github_owner }) => {
        const workflows = {
          "java-maven": {
            build: `
          - name: Set up JDK 17
            uses: actions/setup-java@v4
            with:
              java-version: '17'
              distribution: 'temurin'
              cache: maven
    
          - name: Build with Maven
            run: mvn -B package --file pom.xml
    
          - name: Run tests
            run: mvn test`,
            artifact: "target/*.jar"
          },
          "java-gradle": {
            build: `
          - name: Set up JDK 17
            uses: actions/setup-java@v4
            with:
              java-version: '17'
              distribution: 'temurin'
              cache: gradle
    
          - name: Build with Gradle
            run: ./gradlew build
    
          - name: Run tests
            run: ./gradlew test`,
            artifact: "build/libs/*.jar"
          },
          "nodejs": {
            build: `
          - name: Setup Node.js
            uses: actions/setup-node@v4
            with:
              node-version: '20'
              cache: 'npm'
    
          - name: Install dependencies
            run: npm ci
    
          - name: Run tests
            run: npm test
    
          - name: Build
            run: npm run build --if-present`,
            artifact: "dist/"
          },
          "python": {
            build: `
          - name: Set up Python
            uses: actions/setup-python@v5
            with:
              python-version: '3.11'
              cache: 'pip'
    
          - name: Install dependencies
            run: |
              python -m pip install --upgrade pip
              pip install -r requirements.txt
              pip install pytest
    
          - name: Run tests
            run: pytest`,
            artifact: ""
          },
          "golang": {
            build: `
          - name: Set up Go
            uses: actions/setup-go@v5
            with:
              go-version: '1.21'
    
          - name: Build
            run: go build -v ./...
    
          - name: Test
            run: go test -v ./...`,
            artifact: ""
          }
        };
    
        const config = workflows[project_type];
        if (!config) {
          return {
            content: [{
              type: "text",
              text: `Unknown project type: ${project_type}\n\nSupported: java-maven, java-gradle, nodejs, python, golang`
            }]
          };
        }
    
        let dockerSteps = "";
        if (include_docker) {
          dockerSteps = `
    
      docker:
        needs: build
        runs-on: ubuntu-latest
        permissions:
          contents: read
          packages: write
    
        steps:
          - name: Checkout
            uses: actions/checkout@v4
    
          - name: Set up Docker Buildx
            uses: docker/setup-buildx-action@v3
    
          - name: Login to GHCR
            uses: docker/login-action@v3
            with:
              registry: ghcr.io
              username: \${{ github.actor }}
              password: \${{ secrets.GITHUB_TOKEN }}
    
          - name: Extract metadata
            id: meta
            uses: docker/metadata-action@v5
            with:
              images: ghcr.io/${github_owner || "${{ github.repository_owner }}"}/${"${{ github.event.repository.name }}"}
              tags: |
                type=ref,event=branch
                type=ref,event=pr
                type=sha,prefix=
                type=raw,value=latest,enable={{is_default_branch}}
    
          - name: Build and push
            uses: docker/build-push-action@v5
            with:
              context: .
              push: \${{ github.event_name != 'pull_request' }}
              tags: \${{ steps.meta.outputs.tags }}
              labels: \${{ steps.meta.outputs.labels }}
              cache-from: type=gha
              cache-to: type=gha,mode=max`;
        }
    
        const workflow = `name: CI/CD
    
    on:
      push:
        branches: [ main, master, develop ]
      pull_request:
        branches: [ main, master ]
    
    jobs:
      build:
        runs-on: ubuntu-latest
    
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
    ${config.build}${dockerSteps}
    `;
    
        return {
          content: [{
            type: "text",
            text: `GITHUB ACTIONS WORKFLOW
    =======================
    
    Save this to: .github/workflows/ci.yml
    
    ${workflow}
    
    SETUP STEPS:
    1. Create directory: mkdir -p .github/workflows
    2. Save the above YAML to: .github/workflows/ci.yml
    3. Commit and push:
       git add .github/
       git commit -m "feat: add CI/CD workflow"
       git push
    
    The workflow will:
    - Run on push to main/master/develop
    - Run on pull requests
    - Build and test your code${include_docker ? "\n- Build and push Docker image to GHCR" : ""}
    
    GHCR packages will appear at:
    https://github.com/${github_owner || "YOUR_USERNAME"}?tab=packages`
          }]
        };
      }
    );
  • Input schema defining parameters for the github_actions_create_ci tool: project_type (required), include_docker, include_sonar, sonar_org, github_owner
      project_type: {
        type: "string",
        description: "Project type: java-maven, java-gradle, nodejs, python, golang"
      },
      include_docker: { type: "boolean", description: "Include Docker build and GHCR push", default: true },
      include_sonar: { type: "boolean", description: "Include SonarCloud analysis", default: false },
      sonar_org: { type: "string", description: "SonarCloud organization (if include_sonar)", default: "" },
      github_owner: { type: "string", description: "GitHub owner for GHCR push" }
    },
  • Handler implementation that generates and returns a GitHub Actions CI/CD workflow YAML based on the project type, with optional Docker build/push to GHCR and SonarCloud integration.
      async ({ project_type, include_docker, github_owner }) => {
        const workflows = {
          "java-maven": {
            build: `
          - name: Set up JDK 17
            uses: actions/setup-java@v4
            with:
              java-version: '17'
              distribution: 'temurin'
              cache: maven
    
          - name: Build with Maven
            run: mvn -B package --file pom.xml
    
          - name: Run tests
            run: mvn test`,
            artifact: "target/*.jar"
          },
          "java-gradle": {
            build: `
          - name: Set up JDK 17
            uses: actions/setup-java@v4
            with:
              java-version: '17'
              distribution: 'temurin'
              cache: gradle
    
          - name: Build with Gradle
            run: ./gradlew build
    
          - name: Run tests
            run: ./gradlew test`,
            artifact: "build/libs/*.jar"
          },
          "nodejs": {
            build: `
          - name: Setup Node.js
            uses: actions/setup-node@v4
            with:
              node-version: '20'
              cache: 'npm'
    
          - name: Install dependencies
            run: npm ci
    
          - name: Run tests
            run: npm test
    
          - name: Build
            run: npm run build --if-present`,
            artifact: "dist/"
          },
          "python": {
            build: `
          - name: Set up Python
            uses: actions/setup-python@v5
            with:
              python-version: '3.11'
              cache: 'pip'
    
          - name: Install dependencies
            run: |
              python -m pip install --upgrade pip
              pip install -r requirements.txt
              pip install pytest
    
          - name: Run tests
            run: pytest`,
            artifact: ""
          },
          "golang": {
            build: `
          - name: Set up Go
            uses: actions/setup-go@v5
            with:
              go-version: '1.21'
    
          - name: Build
            run: go build -v ./...
    
          - name: Test
            run: go test -v ./...`,
            artifact: ""
          }
        };
    
        const config = workflows[project_type];
        if (!config) {
          return {
            content: [{
              type: "text",
              text: `Unknown project type: ${project_type}\n\nSupported: java-maven, java-gradle, nodejs, python, golang`
            }]
          };
        }
    
        let dockerSteps = "";
        if (include_docker) {
          dockerSteps = `
    
      docker:
        needs: build
        runs-on: ubuntu-latest
        permissions:
          contents: read
          packages: write
    
        steps:
          - name: Checkout
            uses: actions/checkout@v4
    
          - name: Set up Docker Buildx
            uses: docker/setup-buildx-action@v3
    
          - name: Login to GHCR
            uses: docker/login-action@v3
            with:
              registry: ghcr.io
              username: \${{ github.actor }}
              password: \${{ secrets.GITHUB_TOKEN }}
    
          - name: Extract metadata
            id: meta
            uses: docker/metadata-action@v5
            with:
              images: ghcr.io/${github_owner || "${{ github.repository_owner }}"}/${"${{ github.event.repository.name }}"}
              tags: |
                type=ref,event=branch
                type=ref,event=pr
                type=sha,prefix=
                type=raw,value=latest,enable={{is_default_branch}}
    
          - name: Build and push
            uses: docker/build-push-action@v5
            with:
              context: .
              push: \${{ github.event_name != 'pull_request' }}
              tags: \${{ steps.meta.outputs.tags }}
              labels: \${{ steps.meta.outputs.labels }}
              cache-from: type=gha
              cache-to: type=gha,mode=max`;
        }
    
        const workflow = `name: CI/CD
    
    on:
      push:
        branches: [ main, master, develop ]
      pull_request:
        branches: [ main, master ]
    
    jobs:
      build:
        runs-on: ubuntu-latest
    
        steps:
          - name: Checkout code
            uses: actions/checkout@v4
    ${config.build}${dockerSteps}
    `;
    
        return {
          content: [{
            type: "text",
            text: `GITHUB ACTIONS WORKFLOW
    =======================
    
    Save this to: .github/workflows/ci.yml
    
    ${workflow}
    
    SETUP STEPS:
    1. Create directory: mkdir -p .github/workflows
    2. Save the above YAML to: .github/workflows/ci.yml
    3. Commit and push:
       git add .github/
       git commit -m "feat: add CI/CD workflow"
       git push
    
    The workflow will:
    - Run on push to main/master/develop
    - Run on pull requests
    - Build and test your code${include_docker ? "\n- Build and push Docker image to GHCR" : ""}
    
    GHCR packages will appear at:
    https://github.com/${github_owner || "YOUR_USERNAME"}?tab=packages`
          }]
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates a workflow but doesn't explain what that entails—e.g., whether it creates a file, modifies existing configurations, requires authentication, or has side effects. For a tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Generate a CI/CD workflow for the project.' It's front-loaded with the core action and resource, with no wasted words, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of generating a CI/CD workflow, the description is incomplete. It lacks details on what the workflow includes, output format (no output schema), or how it integrates with the project. With no annotations and a vague purpose, it doesn't provide enough context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description doesn't add param details, which is acceptable here. Baseline is 4 for 0 parameters, as the schema fully covers the absence of inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate a CI/CD workflow for the project.' It specifies the verb ('Generate') and the resource ('CI/CD workflow'), making it easy to understand what the tool does. However, it doesn't differentiate from sibling tools like 'azure_create_workflow' or 'sonarcloud_create_workflow', which also create workflows, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., for GitHub Actions specifically), or exclusions. With sibling tools like 'azure_create_workflow' and 'sonarcloud_create_workflow' available, the lack of comparative guidance is a significant gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rideRTD/RTD-DevOps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server