Skip to content

Conversation

@sirily11
Copy link
Contributor

…deployment

Copilot AI review requested due to automatic review settings January 19, 2026 14:11
@autopilot-project-manager autopilot-project-manager bot added the enhancement New feature or request label Jan 19, 2026
@autopilot-project-manager
Copy link

Autopilot PR Check Issues

The following potential issues were detected in this PR:

k8s/deployment.yaml

  • 🔒 Line 21 (Hardcoded Value): Hardcoded image owner 'sirily11' likely mismatches the repository owner ('rxtech-lab') used in the build workflow, causing deployment failures.
    image: ghcr.io/sirily11/markitdown-server:latest
    

Please review and address these issues before merging.

@sirily11 sirily11 merged commit b5e9945 into main Jan 19, 2026
2 of 3 checks passed
@sirily11 sirily11 deleted the ci branch January 19, 2026 14:14
@sirily11
Copy link
Contributor Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds GitHub Actions workflows for automated release management and Docker deployment to the markitdown-server project. It renames the Kubernetes namespace from "mcp-router" to "markitdown-server" and updates the Docker image reference to use GitHub Container Registry.

Changes:

  • Added semantic-release configuration and GitHub Actions workflows for automated release creation and Docker image publishing
  • Updated Kubernetes namespace from "mcp-router" to "markitdown-server"
  • Changed Docker image reference to use GitHub Container Registry (ghcr.io)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
.releaserc Configures semantic-release plugins for automated release management
.github/workflows/create-release.yaml Workflow for creating releases via semantic-release on manual trigger
.github/workflows/release.yaml Workflow for building/pushing Docker images and deploying to Kubernetes on release creation
k8s/namespace.yaml Updates namespace from "mcp-router" to "markitdown-server"
k8s/kustomization.yaml Updates namespace reference to match new namespace name
k8s/deployment.yaml Updates Docker image to use GitHub Container Registry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to +42
type=ref,event=branch
type=ref,event=pr
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The metadata extraction includes tag types for branch and PR events (lines 38-39), but this workflow only triggers on release creation events. These tag type configurations will never be used and should be removed to avoid confusion.

Suggested change
type=ref,event=branch
type=ref,event=pr

Copilot uses AI. Check for mistakes.
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix=sha-
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SHA-based tag (line 44) will be generated for every release, potentially creating confusion since the release is already versioned. Consider whether this tag is necessary for this workflow, as it's more commonly used in CI workflows that build on every commit.

Suggested change
type=sha,prefix=sha-

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +84
uses: azure/setup-kubectl@v4
with:
version: "latest"

- name: Configure kubectl
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kubeconfig file is written to disk with sensitive credentials. While the file permissions are set to 600, consider adding cleanup logic to remove the kubeconfig file after the workflow completes, even if subsequent steps fail. This can be done by adding a post-action step or using a try-finally pattern.

Copilot uses AI. Check for mistakes.
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow uses a custom RELEASE_TOKEN secret instead of the default GITHUB_TOKEN. Ensure this token has the necessary permissions to create releases. Alternatively, consider using secrets.GITHUB_TOKEN if the job's permissions (contents: write) are sufficient, which would simplify secret management.

Suggested change
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.ref_name}}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before the closing braces in the template expression. Should be ${{ github.ref_name }} instead of ${{ github.ref_name}}.

Suggested change
VERSION=${{ github.ref_name}}
VERSION=${{ github.ref_name }}

Copilot uses AI. Check for mistakes.
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=raw,value=latest,enable={{is_default_branch}}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest tag is configured to be enabled only on the default branch (line 43), but this workflow triggers on release creation events, not branch pushes. The is_default_branch condition will not work as expected here. Consider using enable=${{ github.event.release.prerelease == false }} to tag stable releases as latest, or remove this condition entirely if all releases should be tagged as latest.

Suggested change
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }}

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +104
# Update kustomization with new image tag
cd k8s
kubectl kustomize . | kubectl apply -f -

# Update the deployment with the specific release tag
kubectl set image deployment/markitdown-server markitdown-server=ghcr.io/${{ github.repository_owner }}/markitdown-server:${VERSION} -n markitdown-server

Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deployment update step first applies the kustomization (line 96), then updates the image using kubectl set image (line 99). This could cause a brief moment where the deployment uses the default image from the kustomization before being updated to the release version. Consider using kustomize's image transformation features to set the correct image tag before applying, or use only the kubectl set image command without the prior apply.

Suggested change
# Update kustomization with new image tag
cd k8s
kubectl kustomize . | kubectl apply -f -
# Update the deployment with the specific release tag
kubectl set image deployment/markitdown-server markitdown-server=ghcr.io/${{ github.repository_owner }}/markitdown-server:${VERSION} -n markitdown-server
# Navigate to kustomization directory
cd k8s
# Ensure kustomize CLI is available (required for 'kustomize edit set image')
if ! command -v kustomize >/dev/null 2>&1; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
export PATH="$PATH:$(pwd)"
fi
# Update kustomization with the specific release image tag
kustomize edit set image markitdown-server=ghcr.io/${{ github.repository_owner }}/markitdown-server:${VERSION}
# Build and apply manifests with the correct image already set
kustomize build . | kubectl apply -f -

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +64
build-args: |
VERSION=${{ github.ref_name}}
COMMIT_HASH=${{ github.sha }}
BUILD_TIME=${{ steps.build_time.outputs.BUILD_TIME }}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow passes build arguments VERSION, COMMIT_HASH, and BUILD_TIME to the Docker build, but the Dockerfile does not define or use these ARG values. Either add ARG declarations in the Dockerfile to use these values (e.g., for metadata labels or environment variables), or remove these build-args from the workflow configuration.

Suggested change
build-args: |
VERSION=${{ github.ref_name}}
COMMIT_HASH=${{ github.sha }}
BUILD_TIME=${{ steps.build_time.outputs.BUILD_TIME }}

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,3 @@
{
plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github']
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .releaserc file uses JavaScript object notation with unquoted property keys, but semantic-release expects valid JSON format. The plugins key should be quoted.

Suggested change
plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github']
"plugins": ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/github"]

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ (github.event.pusher.name != 'github action') && (github.ref == 'refs/heads/main') }}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition references github.event.pusher.name which is not available for workflow_dispatch events. This field is only present in push events. For workflow_dispatch events, consider using github.actor or github.triggering_actor instead, or remove this condition entirely since manual workflows are already intentional actions.

Suggested change
if: ${{ (github.event.pusher.name != 'github action') && (github.ref == 'refs/heads/main') }}
if: ${{ (github.actor != 'github action') && (github.ref == 'refs/heads/main') }}

Copilot uses AI. Check for mistakes.
@sirily11 sirily11 restored the ci branch January 19, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants