From 5beb3432d45009a4854c8d7f335fdd1e2170fdba Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Fri, 28 Aug 2026 12:45:05 -0400 Subject: [PATCH] chore(ci): remove the Sandbox Image workflow and document the local build --- .github/workflows/sandbox-image.yml | 90 ----------------------------- docs/features/sandboxing.md | 12 +++- 2 files changed, 11 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/sandbox-image.yml diff --git a/.github/workflows/sandbox-image.yml b/.github/workflows/sandbox-image.yml deleted file mode 100644 index e940ae43..00000000 --- a/.github/workflows/sandbox-image.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Sandbox Image - -on: - workflow_dispatch: - inputs: - image: - description: 'Fully qualified image name to push (registry/namespace/name)' - required: false - default: 'docker.io/cstechdev/ocm-sandbox' - playwright_version: - description: 'Playwright version providing the bundled Chromium' - required: false - default: '1.56.0' - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Resolve build inputs - id: resolve - env: - REGISTRY_USERNAME: ${{ secrets.SANDBOX_REGISTRY_USERNAME }} - REGISTRY_TOKEN: ${{ secrets.SANDBOX_REGISTRY_TOKEN }} - run: | - IMAGE="${{ github.event.inputs.image }}" - [ -n "$IMAGE" ] || IMAGE="docker.io/cstechdev/ocm-sandbox" - PLAYWRIGHT_VERSION="${{ github.event.inputs.playwright_version }}" - [ -n "$PLAYWRIGHT_VERSION" ] || PLAYWRIGHT_VERSION="1.56.0" - REGISTRY="${IMAGE%%/*}" - case "$REGISTRY" in - *.*|*:*|localhost) ;; - *) echo "ERROR: image '$IMAGE' must be fully qualified with a registry host" >&2; exit 1 ;; - esac - if [ "$REGISTRY" != "ghcr.io" ] && { [ -z "$REGISTRY_USERNAME" ] || [ -z "$REGISTRY_TOKEN" ]; }; then - echo "ERROR: pushing to $REGISTRY requires the SANDBOX_REGISTRY_USERNAME and SANDBOX_REGISTRY_TOKEN repository secrets" >&2 - echo "GITHUB_TOKEN only authenticates against ghcr.io" >&2 - exit 1 - fi - echo "image=${IMAGE}" >> $GITHUB_OUTPUT - echo "registry=${REGISTRY}" >> $GITHUB_OUTPUT - echo "playwright=${PLAYWRIGHT_VERSION}" >> $GITHUB_OUTPUT - echo "Building ${IMAGE} on ${REGISTRY} with playwright=${PLAYWRIGHT_VERSION}" - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ steps.resolve.outputs.image }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=raw,value=latest - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to registry - uses: docker/login-action@v3 - with: - registry: ${{ steps.resolve.outputs.registry }} - username: ${{ secrets.SANDBOX_REGISTRY_USERNAME || github.actor }} - password: ${{ secrets.SANDBOX_REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.sandbox - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: | - PLAYWRIGHT_VERSION=${{ steps.resolve.outputs.playwright }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Report digest - run: echo "Published ${{ steps.meta.outputs.tags }}" diff --git a/docs/features/sandboxing.md b/docs/features/sandboxing.md index fcc87276..5dd7240b 100644 --- a/docs/features/sandboxing.md +++ b/docs/features/sandboxing.md @@ -154,7 +154,17 @@ Understand the trade-off before enabling it. `msb exec -e` is the only injection ## Sandbox Guest Image -`SANDBOX_IMAGE` defaults to `docker.io/cstechdev/ocm-sandbox:latest`, built from `Dockerfile.sandbox` in this repository and published for `linux/amd64` and `linux/arm64` by the `Sandbox Image` workflow. +`SANDBOX_IMAGE` defaults to `docker.io/cstechdev/ocm-sandbox:latest`, built from `Dockerfile.sandbox` in this repository and published for `linux/amd64` and `linux/arm64` from a build host with `docker buildx`: + +```bash +docker buildx build --platform linux/amd64,linux/arm64 \ + -t docker.io/cstechdev/ocm-sandbox:latest \ + --build-arg PLAYWRIGHT_VERSION=1.56.0 \ + -f Dockerfile.sandbox --load . +docker tag docker.io/cstechdev/ocm-sandbox:latest docker.io/cstechdev/ocm-sandbox:0.17.1 +docker push docker.io/cstechdev/ocm-sandbox:latest +docker push docker.io/cstechdev/ocm-sandbox:0.17.1 +``` It is `node:24` (Debian 12, `buildpack-deps` based), so the compile toolchain is already present, plus the package managers and CLI tooling from the Manager image: