fix: update Dockerfile to conditionally install Playwright dependencies based on INSTALL_EXT argument

This commit is contained in:
samanhappy
2025-04-14 17:09:21 +08:00
parent 6b56a9a554
commit 1ea8c3c866
2 changed files with 13 additions and 4 deletions

View File

@@ -8,6 +8,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
variant: [base, full]
steps:
- uses: actions/checkout@v4
with:
@@ -28,9 +31,9 @@ jobs:
with:
images: samanhappy/mcphub
tags: |
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=edge${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}${{ matrix.variant == 'full' && '-full' || '' }},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
uses: docker/build-push-action@v5
@@ -42,3 +45,5 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
build-args: |
INSTALL_EXT=${{ matrix.variant == 'full' && 'true' || 'false' }}