|
| 1 | +name: Docker MCP Server |
| 2 | + |
| 3 | +on: |
| 4 | + release: |
| 5 | + types: [published] |
| 6 | + |
| 7 | +jobs: |
| 8 | + docker: |
| 9 | + name: Build and push MCP server image |
| 10 | + if: startsWith(github.event.release.tag_name, '@transloadit/mcp-server@') |
| 11 | + runs-on: ubuntu-latest |
| 12 | + permissions: |
| 13 | + contents: read |
| 14 | + packages: write |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Extract version from release tag |
| 19 | + id: version |
| 20 | + run: | |
| 21 | + TAG="${{ github.event.release.tag_name }}" |
| 22 | + VERSION="${TAG#@transloadit/mcp-server@}" |
| 23 | + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" |
| 24 | +
|
| 25 | + - uses: docker/setup-buildx-action@v3 |
| 26 | + |
| 27 | + - uses: docker/login-action@v3 |
| 28 | + with: |
| 29 | + registry: ghcr.io |
| 30 | + username: ${{ github.actor }} |
| 31 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + |
| 33 | + - uses: docker/build-push-action@v6 |
| 34 | + with: |
| 35 | + context: packages/mcp-server |
| 36 | + file: packages/mcp-server/Dockerfile |
| 37 | + push: true |
| 38 | + tags: | |
| 39 | + ghcr.io/transloadit/mcp-server:${{ steps.version.outputs.version }} |
| 40 | + ghcr.io/transloadit/mcp-server:latest |
| 41 | + labels: | |
| 42 | + org.opencontainers.image.title=Transloadit MCP Server |
| 43 | + org.opencontainers.image.description=Process video, audio, images, and documents with 86+ cloud media processing robots |
| 44 | + org.opencontainers.image.source=https://github.com/transloadit/node-sdk |
| 45 | + org.opencontainers.image.version=${{ steps.version.outputs.version }} |
| 46 | + org.opencontainers.image.licenses=MIT |
| 47 | + platforms: linux/amd64,linux/arm64 |
| 48 | + cache-from: type=gha |
| 49 | + cache-to: type=gha,mode=max |
0 commit comments