feat: Add staging blueprint (cn-staging) for isolated testing
- 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 <noreply@anthropic.com>
This commit is contained in:
31
.github/workflows/runloop-blueprint-staging-template.json
vendored
Normal file
31
.github/workflows/runloop-blueprint-staging-template.json
vendored
Normal file
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
22
.github/workflows/upload-runloop-blueprint.yml
vendored
22
.github/workflows/upload-runloop-blueprint.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user