Skip to content

feat: add skip_install input for pre-installed CLI runners#13

Open
qwen-code-dev-bot wants to merge 1 commit into
QwenLM:mainfrom
qwen-code-dev-bot:feat/skip-install
Open

feat: add skip_install input for pre-installed CLI runners#13
qwen-code-dev-bot wants to merge 1 commit into
QwenLM:mainfrom
qwen-code-dev-bot:feat/skip-install

Conversation

@qwen-code-dev-bot

Copy link
Copy Markdown

What this PR does

Adds a skip_install input (default: false) that skips the npm/pnpm installation step when the Qwen Code CLI is already pre-installed on the runner.

Why it's needed

Self-hosted ECS runners (like those used in qwen-code's Autofix/triage workflows) maintain a persistent qwen CLI installation. The current action always runs npm install --global on every invocation, which is redundant and adds ~30s of overhead per run.

This pattern was already adopted in qwen-code's own workflows:

  • PR #4866 (qwen-code) proposed using pre-installed qwen in ECS workflows
  • PR #6207 (qwen-code) adopted a similar approach in Autofix

But qwen-code-action itself has no way to skip the install step — workflows that use the action on pre-installed runners still pay the install cost.

Changes

  1. New input: skip_install (string, default 'false')
  2. Install pnpm step: skipped when skip_install == 'true'
  3. Install Qwen Code step: skipped when skip_install == 'true'
  4. New step: "Verify pre-installed Qwen Code" — runs when skip_install == 'true', checks that qwen is in PATH and fails with a clear ::error if not

Usage

- uses: QwenLM/qwen-code-action@v1
  with:
    skip_install: 'true'
    openai_api_key: ${{ secrets.OPENAI_API_KEY }}
    prompt: '...'

Risk & Scope

  • Default is false — existing workflows are unaffected.
  • The verify step fails fast with a clear error message if qwen is not found, so misconfiguration is caught immediately.
  • No changes to the Run Qwen Code step or any other behavior.

Add a skip_install input (default: false) that skips the npm/pnpm
installation step when the Qwen Code CLI is already pre-installed on
the runner (e.g. self-hosted ECS runners).

When skip_install is true:
- Install pnpm step is skipped
- Install Qwen Code step is skipped
- A new Verify pre-installed Qwen Code step checks that qwen is
  in PATH and fails with a clear error if not

This avoids redundant per-run installs on runners that maintain a
persistent CLI installation, matching the pattern already used in
qwen-code Autofix/triage workflows (PR #4866, #6207).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant