feat: add automated OpenClaw upgrade pipeline with CI verification and Copilot-assisted fixes - #39
Draft
vhrahulkumar wants to merge 1 commit into
Conversation
…egration Adds a fully automated upgrade system that runs every Monday and handles the full lifecycle of detecting, testing, and fixing OpenClaw version bumps: - GitHub Actions workflow (`openclaw-upgrade-check.yml`) that detects new OpenClaw releases from the upstream Docker image on GHCR - Two-layer test suite: Docker smoke tests (14 checks) and optional DigitalOcean App Platform E2E tests (8 checks) validating config generation, process startup, auth mode, channel plugins, and more - Automatic PR creation when all tests pass, or GitHub issue creation with full test logs when they fail - GitHub Copilot Coding Agent integration: failures automatically assign Copilot to the issue via the REST API so it investigates and opens a fix PR without manual intervention - `copilot-instructions.md` with explicit upgrade rules so Copilot fixes application code rather than modifying tests - `openclaw-upgrader.prompt.md` agent prompt with step-by-step fix guidance - Security hardening: quoted heredocs throughout to prevent secret leakage via shell expansion, randomised GITHUB_OUTPUT delimiters to prevent output corruption
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a fully automated upgrade pipeline that detects new OpenClaw releases, tests them against Docker smoke tests and App Platform E2E, and either opens a PR (if tests pass) or creates an issue with Copilot auto-assigned to investigate (if tests fail).
This replaces the manual process of checking for new versions, bumping the Dockerfile, testing locally, and creating PRs by hand.
How it works
Weekly cycle (every Monday at 2pm UTC)
OPENCLAW_VERSIONin Dockerfile against latest stable release. Checks for known upstream regressions.04-upgrade-verify.sh)e2e-{run_id}tagCopilot auto-fix flow
When tests fail, the workflow:
COPILOT_TRIGGER_TOKEN(fine-grained PAT).github/copilot-instructions.mdfor architecture rules and constraintsManual trigger
Can be triggered via
workflow_dispatchwith optional inputs:force_version— Force upgrade to a specific versionimage_tag— Skip build, use existing GHCR image for E2EFiles added (7 files, +1790 lines)
.github/workflows/openclaw-upgrade-check.yml.github/copilot-instructions.md.github/prompts/openclaw-upgrader.prompt.mdtests/minimal/04-upgrade-verify.shtests/e2e/deploy-and-test.shtests/e2e/app-spec-template.yamltests/e2e/cleanup-stale-apps.shWhat the Docker smoke tests verify (14 checks)
tools.profileset tocoding(not upstream defaultmessaging)openclawuser (not root)tokenopenclaw doctorcompletesTELEGRAM_BOT_TOKENset)What the E2E tests verify
Security considerations
<<'EOF') to prevent shell expansion of upstream content containing$(), backticks, etc.--body-fileinstead of inline--bodyto prevent secret leakingCOPILOT_TRIGGER_TOKEN) scoped to issues onlyRequired secrets
DOCTL_TOKENCOPILOT_TRIGGER_TOKENTELEGRAM_BOT_TOKENValidated against
84bf7e8) without modifying test filesNo existing files modified
This PR only adds new files. No changes to Dockerfile, rootfs, or existing tests.