Skip to content

Commit ae3d569

Browse files
committed
refactor: consolidate publishing into unified system
- Create comprehensive PUBLISHING.md guide replacing scattered docs - Replace old workflows with unified manual-only publish.yml workflow - Add container.yml for manual container publishing - Consolidate scripts into scripts/ directory - Add architecture selection and registry options - Remove automatic triggers, make all publishing manual - Fix gofmt hints in OpenShift AI toolsets Features: - Manual-only publishing with workflow dispatch - Architecture selection for targeted publishing - Unified documentation for all publishing methods - Clean separation of GitHub Packages vs public npm - Container publishing with multi-architecture support
1 parent fc39bdf commit ae3d569

17 files changed

+908
-1415
lines changed

.github/workflows/container.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Publish Container Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Image tag (default: latest)'
8+
required: false
9+
default: 'latest'
10+
type: string
11+
platforms:
12+
description: 'Target platforms (comma-separated)'
13+
required: false
14+
default: 'linux/amd64,linux/arm64'
15+
type: string
16+
17+
env:
18+
# Fork attribution: This is a fork of containers/kubernetes-mcp-server enhanced with OpenShift AI support
19+
# Original project: https://github.com/containers/kubernetes-mcp-server by Marc Nuri
20+
# This fork adds OpenShift AI capabilities while maintaining full compatibility with the original
21+
IMAGE_NAME: quay.io/macayaven/kubernetes_mcp_server_openshift_ai
22+
23+
jobs:
24+
publish:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Podman
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y podman
34+
35+
- name: Login to Quay
36+
run: |
37+
# Using fork maintainer's registry credentials
38+
echo "${{ secrets.QUAY_PASSWORD }}" | podman login quay.io -u "${{ secrets.QUAY_USERNAME }}" --password-stdin
39+
40+
- name: Parse platforms
41+
id: platforms
42+
run: |
43+
IFS=',' read -ra PLATFORMS <<< "${{ github.event.inputs.platforms }}"
44+
echo "platforms=$(printf '%s\n' "${PLATFORMS[@]}" | jq -R . | jq -s . | jq -c .)" >> $GITHUB_OUTPUT
45+
46+
- name: Build and push images
47+
run: |
48+
# Create manifest
49+
podman manifest create "${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}"
50+
51+
# Build for each platform
52+
for platform in ${{ steps.platforms.outputs.platforms }}; do
53+
echo "🏗️ Building for $platform..."
54+
55+
podman build \
56+
--platform "$platform" \
57+
-f Dockerfile \
58+
-t "${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}-${platform//\//-}" \
59+
.
60+
61+
podman push "${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}-${platform//\//-}"
62+
63+
# Add to manifest
64+
podman manifest add "${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}" \
65+
"docker://${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}-${platform//\//-}"
66+
done
67+
68+
# Push manifest
69+
echo "📦 Pushing multi-architecture manifest..."
70+
podman manifest push "${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}"
71+
72+
- name: Summary
73+
run: |
74+
echo "## 🐳 Container Publishing Complete!" >> $GITHUB_STEP_SUMMARY
75+
echo "" >> $GITHUB_STEP_SUMMARY
76+
echo "### 📦 Image Details" >> $GITHUB_STEP_SUMMARY
77+
echo "- **Registry**: quay.io" >> $GITHUB_STEP_SUMMARY
78+
echo "- **Image**: `${{ env.IMAGE_NAME }}`" >> $GITHUB_STEP_SUMMARY
79+
echo "- **Tag**: `${{ github.event.inputs.tag }}`" >> $GITHUB_STEP_SUMMARY
80+
echo "- **Platforms**: ${{ github.event.inputs.platforms }}" >> $GITHUB_STEP_SUMMARY
81+
echo "" >> $GITHUB_STEP_SUMMARY
82+
echo "### 🚀 Usage" >> $GITHUB_STEP_SUMMARY
83+
echo '```bash' >> $GITHUB_STEP_SUMMARY
84+
echo "# Pull the image" >> $GITHUB_STEP_SUMMARY
85+
echo "podman pull ${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}" >> $GITHUB_STEP_SUMMARY
86+
echo "" >> $GITHUB_STEP_SUMMARY
87+
echo "# Run with kubeconfig" >> $GITHUB_STEP_SUMMARY
88+
echo "podman run -it --rm \\" >> $GITHUB_STEP_SUMMARY
89+
echo " -v ~/.kube/config:/root/.kube/config:ro \\" >> $GITHUB_STEP_SUMMARY
90+
echo " ${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag }}" >> $GITHUB_STEP_SUMMARY
91+
echo '```' >> $GITHUB_STEP_SUMMARY

.github/workflows/publish-npm.yml

Lines changed: 0 additions & 203 deletions
This file was deleted.

0 commit comments

Comments
 (0)