Skip to main content
Glama

Prometheus MCP Server

MIT License
267
  • Linux
  • Apple
sync-version.yml2.33 kB
name: Sync Version on: pull_request: paths: - 'pyproject.toml' push: branches: - main paths: - 'pyproject.toml' permissions: contents: write pull-requests: write jobs: sync-version: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Extract version from pyproject.toml id: get_version run: | VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION" - name: Update Dockerfile run: | VERSION="${{ steps.get_version.outputs.version }}" sed -i "s/org.opencontainers.image.version=\"[^\"]*\"/org.opencontainers.image.version=\"$VERSION\"/" Dockerfile echo "Updated Dockerfile with version $VERSION" - name: Update server.json run: | VERSION="${{ steps.get_version.outputs.version }}" # Update top-level version field jq --arg version "$VERSION" '.version = $version' server.json > server.json.tmp # Update OCI package identifier with version tag (no 'v' prefix) jq --arg version "$VERSION" '.packages[0].identifier = "ghcr.io/pab1it0/prometheus-mcp-server:" + $version' server.json.tmp > server.json.updated mv server.json.updated server.json rm -f server.json.tmp echo "Updated server.json with version $VERSION" - name: Check for changes id: check_changes run: | git diff --exit-code Dockerfile server.json || echo "changes=true" >> $GITHUB_OUTPUT - name: Commit and push changes if: steps.check_changes.outputs.changes == 'true' run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' git add Dockerfile server.json git commit -m "chore: sync version to ${{ steps.get_version.outputs.version }}" git push

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/pab1it0/prometheus-mcp-server'

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