diff --git a/.github/workflows/mcp-server-docker.yml b/.github/workflows/mcp-server-docker.yml index 67002d1a..3bff452c 100644 --- a/.github/workflows/mcp-server-docker.yml +++ b/.github/workflows/mcp-server-docker.yml @@ -6,11 +6,6 @@ on: - "mcp_server/pyproject.toml" branches: - main - pull_request: - paths: - - "mcp_server/pyproject.toml" - branches: - - main workflow_dispatch: inputs: push_image: @@ -41,7 +36,7 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "tag=v$VERSION" >> $GITHUB_OUTPUT - name: Log in to Docker Hub - if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_image) + if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_image) uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -58,7 +53,6 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch - type=ref,event=pr type=raw,value=${{ steps.version.outputs.tag }} type=raw,value=latest,enable={{is_default_branch}} @@ -67,7 +61,8 @@ jobs: with: project: v9jv1mlpwc context: ./mcp_server + file: ./mcp_server/docker/Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_image) }} + push: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_image) }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}