Skip to content

Use PYTHONOPTIMIZE and output memory profiling #20

Use PYTHONOPTIMIZE and output memory profiling

Use PYTHONOPTIMIZE and output memory profiling #20

Workflow file for this run

name: Build MCP Sandbox
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
paths:
- "sandbox/**"
- ".github/workflows/build-sandbox.yml"
workflow_dispatch:
permissions:
contents: read
packages: write
pull-requests: write
jobs:
build:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
context: workflow
images: |
name=ghcr.io/${{ github.repository }}/sandbox
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha,enable={{is_default_branch}},prefix=${{ github.event_name == 'pull_request' && 'pr-' || github.ref_name }}-
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push sandbox image
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: sandbox
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max