cd.yaml•5 kB
name: Publish to container registries
on:
release:
types: [published]
workflow_dispatch:
push:
branches:
- main
paths:
- src/**
- Dockerfile
- pyproject.toml
pull_request:
paths:
- src/**
- Dockerfile
- pyproject.toml
jobs:
docker-hub:
name: Push multi-arch Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
- name: Extract tags and labels for Docker
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
with:
images: sparfenyuk/mcp-proxy
tags: |
type=sha,format=short,prefix=commit-
type=ref,event=tag
labels: |
org.opencontainers.image.authors=Sergey Parfenyuk
org.opencontainers.image.source=https://github.com/sparfenyuk/mcp-proxy
org.opencontainers.image.url=https://github.com/sparfenyuk/mcp-proxy
org.opencontainers.image.title=mcp-proxy
org.opencontainers.image.description=Connect to MCP servers that run on SSE transport, or expose stdio servers as an SSE server using the MCP Proxy server.
org.opencontainers.image.licenses=MIT
org.opencontainers.image.base.name=docker.io/library/python:3.13-alpine
- name: Log in to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Clean Docker cache
if: github.event_name != 'pull_request'
run: |
docker system prune --force
ghcr-io:
name: Push multi-arch Docker image to ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
- name: Extract tags and labels for Docker
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
with:
images: ghcr.io/sparfenyuk/mcp-proxy
tags: |
type=sha,format=short,prefix=commit-
type=ref,event=tag
labels: |
org.opencontainers.image.authors=Sergey Parfenyuk
org.opencontainers.image.source=https://github.com/sparfenyuk/mcp-proxy
org.opencontainers.image.url=https://github.com/sparfenyuk/mcp-proxy
org.opencontainers.image.title=mcp-proxy
org.opencontainers.image.description=Connect to MCP servers that run on SSE transport, or expose stdio servers as an SSE server using the MCP Proxy server.
org.opencontainers.image.licenses=MIT
org.opencontainers.image.base.name=docker.io/library/python:3.13-alpine
- name: Log in to GHCR
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Clean Docker cache
if: github.event_name != 'pull_request'
run: |
docker system prune --force