Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Postgres MCP Dev Environment",
"image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
"postCreateCommand": "/app/.devcontainer/setup_devcontainer.sh",
"userEnvProbe": "loginShell",
"postCreateCommand": ".devcontainer/setup_devcontainer.sh",
"workspaceFolder": "/app",
"workspaceMount": "source=${localWorkspaceFolder},target=/app,type=bind,consistency=cached",
"runArgs": [
Expand All @@ -12,7 +12,8 @@
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.testing.pytestEnabled": true
},
"extensions": [
"ms-python.python",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/setup_devcontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

pip install uv
"$HOME/.local/bin/uv" sync --frozen
"$HOME/.local/bin/uv" sync --frozen --dev
18 changes: 11 additions & 7 deletions .github/workflows/docker-build-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
required: true
default: ""

permissions:
contents: write
packages: write

jobs:
prepare:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -41,7 +45,6 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
version: latest
driver-opts: image=moby/buildkit:latest

Expand All @@ -60,7 +63,7 @@ jobs:
id: docker_meta
uses: docker/metadata-action@v5
with:
images: crystaldba/postgres-mcp
images: ghcr.io/${{ github.repository_owner }}/mcp/postgres
tags: |
type=raw,value=${{ needs.prepare.outputs.version }}
type=raw,value=latest
Expand All @@ -70,11 +73,12 @@ jobs:
echo "check pwd: $(pwd)"
echo "check ls: $(ls -lta)"

- name: Login to DockerHub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -84,5 +88,5 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=registry,ref=crystaldba/postgres-mcp:buildcache
cache-to: type=registry,ref=crystaldba/postgres-mcp:buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/postgres-mcp:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/postgres-mcp:buildcache,mode=max
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "postgres-mcp"
version = "0.3.0"
version = "0.4.0"
description = "PostgreSQL Tuning and Analysis Tool"
readme = "README.md"
requires-python = ">=3.12"
Expand Down
Loading