From 3dc36ba00ea14ec939b34ed841c436fdca43c582 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 2 Jan 2026 13:53:52 -0500 Subject: [PATCH] feat: Add staging blueprint (cn-staging) for isolated testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add runloop-blueprint-staging-template.json with name "cn-staging" - Update upload workflow to use matrix strategy for both blueprints This enables testing blueprint changes in staging before production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../runloop-blueprint-staging-template.json | 31 +++++++++++++++++++ .../workflows/upload-runloop-blueprint.yml | 22 ++++++++----- 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/runloop-blueprint-staging-template.json diff --git a/.github/workflows/runloop-blueprint-staging-template.json b/.github/workflows/runloop-blueprint-staging-template.json new file mode 100644 index 000000000..72827a360 --- /dev/null +++ b/.github/workflows/runloop-blueprint-staging-template.json @@ -0,0 +1,31 @@ +{ + "name": "cn-staging", + "dockerfile": "FROM runloop:runloop/universal-ubuntu-24.04-x86_64-dnd", + "system_setup_commands": [ + "npm i -g @continuedev/cli@latest", + "sudo apt update", + "printf '#!/bin/sh\\nexit 101\\n' | sudo tee /usr/sbin/policy-rc.d > /dev/null && sudo chmod +x /usr/sbin/policy-rc.d", + "sudo apt install -y --no-install-recommends ripgrep chromium chromium-driver xvfb", + "sudo rm /usr/sbin/policy-rc.d", + "sudo mkdir -p /opt/google/chrome", + "sudo ln -s /usr/bin/chromium /opt/google/chrome/chrome", + "curl -1sLf 'https://artifacts-cli.infisical.com/setup.deb.sh' | sudo -E bash", + "sudo apt-get install -y infisical", + "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg", + "sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg", + "echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main' | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null", + "sudo apt update", + "sudo apt install -y gh", + "npm cache clean --force" + ], + "launch_parameters": { + "launch_commands": [ + "export DISPLAY=:99", + "export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium", + "nohup Xvfb :99 -screen 0 1920x1080x24 > /tmp/xvfb.log 2>&1 &", + "sleep 2", + "sudo mkdir -p /home/user", + "for dir in /root/*; do [ -d \"$dir\" ] && [ -d \"$dir/.git\" ] && sudo ln -sf \"$dir\" \"/home/user/$(basename \"$dir\")\"; done" + ] + } +} diff --git a/.github/workflows/upload-runloop-blueprint.yml b/.github/workflows/upload-runloop-blueprint.yml index e88aa5cea..b4738f84e 100644 --- a/.github/workflows/upload-runloop-blueprint.yml +++ b/.github/workflows/upload-runloop-blueprint.yml @@ -7,28 +7,36 @@ on: - main paths: - '.github/workflows/runloop-blueprint-template.json' + - '.github/workflows/runloop-blueprint-staging-template.json' permissions: contents: read jobs: - upload-blueprint: - name: Upload Blueprint to Runloop + upload-blueprints: + name: Upload Blueprints to Runloop runs-on: ubuntu-latest # Only run this workflow on the main repository (continuedev/continue) if: github.repository == 'continuedev/continue' + strategy: + matrix: + include: + - template: runloop-blueprint-template.json + name: cn + - template: runloop-blueprint-staging-template.json + name: cn-staging steps: - name: Checkout uses: actions/checkout@v6 - - name: Publish Blueprint to Runloop + - name: Publish ${{ matrix.name }} Blueprint to Runloop env: RUNLOOP_API_KEY: ${{ secrets.RUNLOOP_API_KEY }} run: | - echo "Publishing blueprint 'cn' to Runloop API" + echo "Publishing blueprint '${{ matrix.name }}' to Runloop API" # Use blueprint configuration from template file - cp .github/workflows/runloop-blueprint-template.json blueprint.json + cp .github/workflows/${{ matrix.template }} blueprint.json # Publish to Runloop API response=$(curl -X POST "https://api.runloop.ai/v1/blueprints" \ @@ -42,7 +50,7 @@ jobs: response_body=$(echo "$response" | head -c -4) if [[ "$http_code" == "200" ]] || [[ "$http_code" == "201" ]]; then - echo "✅ Successfully published blueprint to Runloop API" + echo "✅ Successfully published blueprint '${{ matrix.name }}' to Runloop API" echo "Response: $response_body" # Extract blueprint ID if available @@ -52,7 +60,7 @@ jobs: echo "blueprint_id=$blueprint_id" >> $GITHUB_OUTPUT fi else - echo "❌ Failed to publish blueprint to Runloop API" + echo "❌ Failed to publish blueprint '${{ matrix.name }}' to Runloop API" echo "HTTP Code: $http_code" echo "Response: $response_body" exit 1