mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
fix: update Dockerfile to conditionally install Playwright dependencies based on INSTALL_EXT argument
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -8,6 +8,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
variant: [base, full]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -28,9 +31,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: samanhappy/mcphub
|
images: samanhappy/mcphub
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }}
|
type=raw,value=edge${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ github.ref == 'refs/heads/main' }}
|
||||||
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
type=semver,pattern={{version}}${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
type=raw,value=latest${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
- name: Build and Push Docker Image
|
- name: Build and Push Docker Image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -42,3 +45,5 @@ jobs:
|
|||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
build-args: |
|
||||||
|
INSTALL_EXT=${{ matrix.variant == 'full' && 'true' || 'false' }}
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ ENV PNPM_HOME=/usr/local/share/pnpm
|
|||||||
ENV PATH=$PNPM_HOME:$PATH
|
ENV PATH=$PNPM_HOME:$PATH
|
||||||
RUN mkdir -p $PNPM_HOME && \
|
RUN mkdir -p $PNPM_HOME && \
|
||||||
pnpm add -g @amap/amap-maps-mcp-server @playwright/mcp@latest tavily-mcp@latest @modelcontextprotocol/server-github @modelcontextprotocol/server-slack
|
pnpm add -g @amap/amap-maps-mcp-server @playwright/mcp@latest tavily-mcp@latest @modelcontextprotocol/server-github @modelcontextprotocol/server-slack
|
||||||
RUN npx -y playwright install-deps && npx -y playwright install chrome
|
|
||||||
|
ARG INSTALL_EXT=false
|
||||||
|
RUN if [ "$INSTALL_EXT" = "true" ]; then \
|
||||||
|
npx -y playwright install-deps && npx -y playwright install firefox; \
|
||||||
|
fi
|
||||||
|
|
||||||
RUN uv tool install mcp-server-fetch
|
RUN uv tool install mcp-server-fetch
|
||||||
ENV UV_PYTHON_INSTALL_MIRROR="http://mirrors.aliyun.com/pypi/simple/"
|
ENV UV_PYTHON_INSTALL_MIRROR="http://mirrors.aliyun.com/pypi/simple/"
|
||||||
|
|||||||
Reference in New Issue
Block a user