Skip to content

Commit fe7d0f1

Browse files
authored
Remove image build from CI pipeline (#108)
* chore: move Docker image build to release workflow and bump version - Remove Docker image build steps from CI job - Move Docker image build to deploy job (releases only) - Images are now built and pushed only on release tags - Bump version from 1.5.0 to 1.5.1 * chore: add latest tag to Docker release images - Images on release will now be tagged with both version tags and latest - Ensures users can always pull the latest stable version * chore: sync version to 1.5.1
1 parent 877c46e commit fe7d0f1

File tree

4 files changed

+40
-43
lines changed

4 files changed

+40
-43
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
timeout-minutes: 10
2020
permissions:
2121
contents: read
22-
packages: write
2322

2423
steps:
2524
- name: Checkout repository
@@ -72,44 +71,6 @@ jobs:
7271
name: python-package-distributions
7372
path: dist/
7473

75-
- name: Set up QEMU
76-
uses: docker/setup-qemu-action@v3
77-
78-
- name: Set up Docker Buildx
79-
uses: docker/setup-buildx-action@v3
80-
81-
- name: Log in to the Container registry
82-
if: github.event_name != 'pull_request'
83-
uses: docker/login-action@v3
84-
with:
85-
registry: ${{ env.REGISTRY }}
86-
username: ${{ github.actor }}
87-
password: ${{ secrets.GITHUB_TOKEN }}
88-
89-
- name: Extract metadata (tags, labels) for Docker
90-
id: meta
91-
uses: docker/metadata-action@v5
92-
with:
93-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
94-
tags: |
95-
type=ref,event=branch
96-
type=ref,event=pr
97-
type=semver,pattern={{version}}
98-
type=semver,pattern={{major}}.{{minor}}
99-
type=semver,pattern={{major}}
100-
type=sha,format=long
101-
102-
- name: Build and push Docker image
103-
uses: docker/build-push-action@v5
104-
with:
105-
context: .
106-
push: ${{ github.event_name != 'pull_request' }}
107-
tags: ${{ steps.meta.outputs.tags }}
108-
labels: ${{ steps.meta.outputs.labels }}
109-
platforms: linux/amd64,linux/arm64
110-
cache-from: type=gha
111-
cache-to: type=gha,mode=max
112-
11374
deploy:
11475
name: Deploy
11576
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
@@ -122,6 +83,7 @@ jobs:
12283
permissions:
12384
contents: write # Required for creating GitHub releases
12485
id-token: write # Required for PyPI publishing and MCP registry OIDC authentication
86+
packages: write # Required for pushing Docker images
12587

12688
steps:
12789
- name: Checkout repository
@@ -160,6 +122,41 @@ jobs:
160122
"$GITHUB_REF_NAME" dist/**
161123
--repo "$GITHUB_REPOSITORY"
162124
125+
- name: Set up QEMU
126+
uses: docker/setup-qemu-action@v3
127+
128+
- name: Set up Docker Buildx
129+
uses: docker/setup-buildx-action@v3
130+
131+
- name: Log in to the Container registry
132+
uses: docker/login-action@v3
133+
with:
134+
registry: ${{ env.REGISTRY }}
135+
username: ${{ github.actor }}
136+
password: ${{ secrets.GITHUB_TOKEN }}
137+
138+
- name: Extract metadata (tags, labels) for Docker
139+
id: meta
140+
uses: docker/metadata-action@v5
141+
with:
142+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
143+
tags: |
144+
type=semver,pattern={{version}}
145+
type=semver,pattern={{major}}.{{minor}}
146+
type=semver,pattern={{major}}
147+
type=raw,value=latest
148+
149+
- name: Build and push Docker image
150+
uses: docker/build-push-action@v5
151+
with:
152+
context: .
153+
push: true
154+
tags: ${{ steps.meta.outputs.tags }}
155+
labels: ${{ steps.meta.outputs.labels }}
156+
platforms: linux/amd64,linux/arm64
157+
cache-from: type=gha
158+
cache-to: type=gha,mode=max
159+
163160
- name: Install MCP Publisher
164161
run: |
165162
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ CMD ["/app/.venv/bin/prometheus-mcp-server"]
6464

6565
LABEL org.opencontainers.image.title="Prometheus MCP Server" \
6666
org.opencontainers.image.description="Model Context Protocol server for Prometheus integration, enabling AI assistants to query metrics and monitor system health" \
67-
org.opencontainers.image.version="1.5.0" \
67+
org.opencontainers.image.version="1.5.1" \
6868
org.opencontainers.image.authors="Pavel Shklovsky <[email protected]>" \
6969
org.opencontainers.image.source="https://github.com/pab1it0/prometheus-mcp-server" \
7070
org.opencontainers.image.licenses="MIT" \

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "prometheus_mcp_server"
3-
version = "1.5.0"
3+
version = "1.5.1"
44
description = "MCP server for Prometheus integration"
55
readme = "README.md"
66
requires-python = ">=3.10"

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
33
"name": "io.github.pab1it0/prometheus-mcp-server",
44
"description": "MCP server providing Prometheus metrics access and PromQL query execution for AI assistants",
5-
"version": "1.5.0",
5+
"version": "1.5.1",
66
"repository": {
77
"url": "https://github.com/pab1it0/prometheus-mcp-server",
88
"source": "github"
@@ -11,7 +11,7 @@
1111
"packages": [
1212
{
1313
"registryType": "oci",
14-
"identifier": "ghcr.io/pab1it0/prometheus-mcp-server:1.5.0",
14+
"identifier": "ghcr.io/pab1it0/prometheus-mcp-server:1.5.1",
1515
"transport": {
1616
"type": "stdio"
1717
},

0 commit comments

Comments
 (0)